[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - vcl/source
Caolán McNamara
caolanm at redhat.com
Sun Jan 7 14:13:27 UTC 2018
vcl/source/filter/wmf/enhwmf.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d3789ea2fb2981d82447418dd5e2e5c7f7cec4d1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 6 20:26:40 2018 +0000
ofz#4980 bail early with 0 points
even if start is 1 of 0
Change-Id: I7e6ad8bcd20f160e08d8795aa38e52fe3aa3cbee
Reviewed-on: https://gerrit.libreoffice.org/47517
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 22125d747dbe..438fd7af5949 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -513,7 +513,7 @@ tools::Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoi
{
bool bRecordOk = nPoints <= SAL_MAX_UINT16;
SAL_WARN_IF(!bRecordOk, "vcl.emf", "polygon record has more polygons than we can handle");
- if (!bRecordOk)
+ if (!bRecordOk || !nPoints)
return tools::Polygon();
tools::Polygon aPolygon(nPoints);
More information about the Libreoffice-commits
mailing list