[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Nov 18 21:31:30 UTC 2016


 sw/source/filter/ww8/ww8scan.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9745d29227e471ce40e9992fefd92e10a48696fb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 18 21:13:01 2016 +0000

    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);


More information about the Libreoffice-commits mailing list