coverity#1394416 ensure there's enough data to read
Change-Id: I9d2cf2e566dd10243a0ca72e6a9278bd2eaed57b
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 7602977..70baffd 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);