diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-13 10:31:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-13 10:47:11 +0100 |
commit | 755b9320c81948358a1d4104c8875594b5700d39 (patch) | |
tree | e071da45ef996ca19a4e85b02d1979f2669f005b /sw | |
parent | 4cb59a867f5a306642f3cbf49bd97b5e14c0998a (diff) |
ww8: make sure we don't wrap around
Change-Id: I667bb264f92024b72f230c2ddbba3887471345f2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 6354f1b955ee..1dc880658785 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1524,7 +1524,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; |