vcl/source/filter/wmf/enhwmf.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit cb13c3bc7c082246b255f270faf9459f1c24412c Author: Caolán McNamara <caol...@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) ) &&
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits