summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-10 12:56:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-10 12:57:31 +0000
commitf50a3995c7b1ba31d68decfab4b2baf4f4df27df (patch)
treec9d8207c86800f0f1eff2557cca14d89f079ebef /vcl
parent3a9e87d14eb4bf9415dd96c77cbec75c03e9682c (diff)
ofz#797 truncate broken polygon to amount read
to avoid super slow polygon math Change-Id: I30ef0afe96d9863df27ef7a4e7f7e8e7af36f8c1
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 2674df3a8c69..6249b41c748d 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -515,7 +515,11 @@ tools::Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoi
T nX, nY;
*pWMF >> nX >> nY;
if (!pWMF->good())
+ {
+ SAL_WARN("vcl.emf", "short read on polygon, truncating");
+ aPolygon.SetSize(i);
break;
+ }
aPolygon[ i ] = Point( nX, nY );
}