diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-10 16:58:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-10 18:14:36 +0100 |
commit | 6ec9b3a6301a73d5a5df038a39e7319e9ac43907 (patch) | |
tree | 33a20b726922fbb8f49b61debe033b273fe247fd /vcl/source | |
parent | d1217a95ef16e662586b88c9f3c9a447eba41e46 (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')
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 3 |
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); |