summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-10 16:58:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-10-10 18:14:36 +0100
commit6ec9b3a6301a73d5a5df038a39e7319e9ac43907 (patch)
tree33a20b726922fbb8f49b61debe033b273fe247fd /vcl/source/gdi
parentd1217a95ef16e662586b88c9f3c9a447eba41e46 (diff)
coverity#1244944 experiment to silence Untrusted loop bound
there's a warning for nPolygonCount but none for nPointCount. I wonder what happens if I tweak the code like this Change-Id: I7e1b02c4790f6b2d1c59e38de1a6a0b17a0485b1
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/cvtsvm.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 2667f23b419e..38a9b523c80a 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -397,6 +397,9 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, tools::PolyPolygon& rPol
sal_uInt16 nPolygonCount(0);
rIStm.ReadUInt16( nPolygonCount );
+ if (!nPolygonCount)
+ return;
+
for(sal_uInt16 a(0); a < nPolygonCount; a++)
{
sal_uInt16 nPointCount(0);