[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Sat Apr 8 20:42:55 UTC 2017
vcl/source/filter/wmf/enhwmf.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit cb13c3bc7c082246b255f270faf9459f1c24412c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Apr 8 21:41:22 2017 +0100
ofz#1069 avoid oom
Change-Id: I7b567f49651496969ca0da56de702f10e6a39494
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 75089260335d..12f0d6232ff5 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -590,6 +590,8 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
pWMF->SeekRel( 0x10 );
// Number of polygons
pWMF->ReadUInt32( nPoly ).ReadUInt32( nGesPoints );
+ if (pWMF->Tell() >= nEndPos)
+ return;
if ( pWMF->good() &&
( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && //check against numeric overflowing
( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) &&
More information about the Libreoffice-commits
mailing list