ofz#1069 avoid oom
Change-Id: I7b567f49651496969ca0da56de702f10e6a39494
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 7508926..12f0d62 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) ) &&