From 9745d29227e471ce40e9992fefd92e10a48696fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 18 Nov 2016 21:13:01 +0000 Subject: [PATCH] coverity#1394416 ensure there's enough data to read Change-Id: I9d2cf2e566dd10243a0ca72e6a9278bd2eaed57b --- sw/source/filter/ww8/ww8scan.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 76029777121b..70baffd87770 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -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);