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

Caolán McNamara caolanm at redhat.com
Mon Jul 13 02:48:27 PDT 2015


 sw/source/filter/ww8/ww8scan.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit cd3e5ddeb4100bab2a39cf9913e14eb371edbbcc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 13 10:31:30 2015 +0100

    ww8: make sure we don't wrap around
    
    Change-Id: I667bb264f92024b72f230c2ddbba3887471345f2
    (cherry picked from commit 755b9320c81948358a1d4104c8875594b5700d39)

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 0446bfc..c97db22 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1542,7 +1542,11 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
         if( 2 == clxt )                         // PLCFfpcd ?
             break;                              // PLCFfpcd gefunden
         if( 1 == clxt )                         // clxtGrpprl ?
+        {
+            if (nGrpprl == SHRT_MAX)
+                return NULL;
             nGrpprl++;
+        }
         sal_uInt16 nLen(0);
         pStr->ReadUInt16( nLen );
         nLeft -= 2 + nLen;


More information about the Libreoffice-commits mailing list