[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - filter/qa filter/source

Caolán McNamara caolanm at redhat.com
Thu Jul 16 02:11:24 PDT 2015


 filter/qa/cppunit/data/met/fail/crash-1.met     |binary
 filter/source/graphicfilter/ios2met/ios2met.cxx |    7 ++++---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit e39e26533cba5be4445bdb39884bb1bc32083bbb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 15 12:25:35 2015 +0100

    bump size type
    
    Change-Id: I2c32c253499a3efb22a3312ed1f0a608649ce124
    (cherry picked from commit dc71a72753202d29544845cfd58992bac63c6837)
    Reviewed-on: https://gerrit.libreoffice.org/17088
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/filter/qa/cppunit/data/met/fail/crash-1.met b/filter/qa/cppunit/data/met/fail/crash-1.met
new file mode 100644
index 0000000..c46b4a9
Binary files /dev/null and b/filter/qa/cppunit/data/met/fail/crash-1.met differ
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 7b024ae..944dab3 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -208,7 +208,7 @@ enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
 struct OSPalette {
     OSPalette * pSucc;
     sal_uInt32 * p0RGB; // May be NULL!
-    sal_uInt16 nSize;
+    size_t nSize;
 };
 
 struct OSArea {
@@ -733,12 +733,13 @@ void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol)
     }
     if (pPaletteStack->p0RGB==NULL || nIndex>=pPaletteStack->nSize) {
         sal_uInt32 * pOld0RGB=pPaletteStack->p0RGB;
-        sal_uInt16 i,nOldSize=pPaletteStack->nSize;
+        size_t nOldSize = pPaletteStack->nSize;
         if (pOld0RGB==NULL) nOldSize=0;
         pPaletteStack->nSize=2*(nIndex+1);
         if (pPaletteStack->nSize<256) pPaletteStack->nSize=256;
         pPaletteStack->p0RGB = new sal_uInt32[pPaletteStack->nSize];
-        for (i=0; i<pPaletteStack->nSize; i++) {
+        for (size_t i=0; i < pPaletteStack->nSize; ++i)
+        {
             if (i<nOldSize) pPaletteStack->p0RGB[i]=pOld0RGB[i];
             else if (i==0) pPaletteStack->p0RGB[i]=0x00ffffff;
             else pPaletteStack->p0RGB[i]=0;


More information about the Libreoffice-commits mailing list