[Libreoffice-commits] core.git: filter/qa filter/source
Caolán McNamara
caolanm at redhat.com
Wed Jul 15 13:16:39 PDT 2015
dev/null |binary
filter/qa/cppunit/data/met/pass/hang-2.met |binary
filter/source/graphicfilter/ios2met/ios2met.cxx | 6 ++++--
3 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 8547c336b3253d90daae1c79a2b1a57996a39102
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 15 21:12:51 2015 +0100
WaE: C2220
Change-Id: Ibf9fa7ffc3beb237a470952c265fb1bce313a08a
diff --git a/filter/qa/cppunit/data/met/fail/hang-2.met b/filter/qa/cppunit/data/met/pass/hang-2.met
similarity index 100%
rename from filter/qa/cppunit/data/met/fail/hang-2.met
rename to filter/qa/cppunit/data/met/pass/hang-2.met
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 0120a90..e58a069 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -1192,13 +1192,15 @@ void OS2METReader::ReadPolygons()
{
sal_uInt32 nNumPoints(0);
pOS2MET->ReadUInt32(nNumPoints);
- if (nNumPoints > (i == 0) ? SAL_MAX_UINT16-1 : SAL_MAX_UINT16)
+ sal_uInt32 nLimit = SAL_MAX_UINT16;
+ if (i==0) --nLimit;
+ if (nNumPoints > nLimit)
{
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=11;
return;
}
- if (i==0) nNumPoints++;
+ if (i==0) ++nNumPoints;
aPoly.SetSize((short)nNumPoints);
for (sal_uInt32 j=0; j<nNumPoints; ++j)
{
More information about the Libreoffice-commits
mailing list