coverity#1394416 ensure there's enough data to read

Change-Id: I9d2cf2e566dd10243a0ca72e6a9278bd2eaed57b
This commit is contained in:
Caolán McNamara
2016-11-18 21:13:01 +00:00
parent 2345e46570
commit 9745d29227

View File

@@ -2550,7 +2550,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(const WW8Fib& rFib, SvStream* pSt,
of the new data
*/
bool bExpand = IsExpandableSprm(nSpId);
if (IsReplaceAllSprm(nSpId) || bExpand)
if ((IsReplaceAllSprm(nSpId) || bExpand) && aEntry.mnLen >= sizeof(sal_uInt32) + 2)
{
sal_uInt32 nCurr = pDataSt->Tell();
sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);