Kaydet (Commit) 17f4f356 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1394416 another effort at silencing Out-of-bounds read

Change-Id: Ie43a6be74bb79fa75bd268cc4b11f90f076eca5a
üst 8d2f58a9
...@@ -2551,7 +2551,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(const WW8Fib& rFib, SvStream* pSt, ...@@ -2551,7 +2551,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(const WW8Fib& rFib, SvStream* pSt,
*/ */
bool bExpand = IsExpandableSprm(nSpId); bool bExpand = IsExpandableSprm(nSpId);
const sal_uInt8* pStartData = aEntry.mpData + 2; const sal_uInt8* pStartData = aEntry.mpData + 2;
const sal_uInt8* pLastValidDataPos = maRawData + sizeof(maRawData) - sizeof(sal_uInt32); const sal_uInt8* pLastValidDataPos = maRawData + 512 - sizeof(sal_uInt32);
if ((IsReplaceAllSprm(nSpId) || bExpand) && pStartData <= pLastValidDataPos) if ((IsReplaceAllSprm(nSpId) || bExpand) && pStartData <= pLastValidDataPos)
{ {
sal_uInt32 nCurr = pDataSt->Tell(); sal_uInt32 nCurr = pDataSt->Tell();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment