vcl/source/filter/wmf/winmtf.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 742cf46659c8093c14052f5135afc9ec3eae7d49 Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jan 21 17:13:47 2017 +0000 ofz#439 protect against 0 len text Change-Id: Ib67284636235b0d43df626a4aeed67f2bc64b491 Reviewed-on: https://gerrit.libreoffice.org/33374 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 2122eba..5aae361 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1483,9 +1483,9 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, l Point aActPosDelta; pVDev->SetMapMode( MapMode( MapUnit::Map100thMM ) ); pVDev->SetFont( maFont ); - if( pDXArry ) + const sal_uInt32 nLen = pDXArry ? rText.getLength() : 0; + if (nLen) { - sal_uInt32 nLen = rText.getLength(); nTextWidth = pVDev->GetTextWidth( OUString(rText[ nLen - 1 ]) ); if( nLen > 1 ) nTextWidth += pDXArry[ nLen - 2 ];
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits