Skip to content

Commit

Permalink
ww8: make sure we don't wrap around
Browse files Browse the repository at this point in the history
Change-Id: I667bb264f92024b72f230c2ddbba3887471345f2
  • Loading branch information
Caolán McNamara committed Jul 13, 2015
1 parent 4cb59a8 commit 755b932
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sw/source/filter/ww8/ww8scan.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 755b932

Please sign in to comment.