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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 22 20:04:20 UTC 2021


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

New commits:
commit 2bd04d18e8558ff16ba4c28e4e9c0c3f7fc1b86c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 11:50:10 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 22 21:03:24 2021 +0100

    cid#1242653 silence bogus Untrusted divisor
    
    Change-Id: I1555754d156b3b8a2143ab179cfde8302d81e46c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112888
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b37cb66f9095..8fbf388cacb1 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -4169,6 +4169,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen
 
             const size_t nMinStringLen = bUnicode ? sizeof(sal_uInt16) : sizeof(sal_uInt8);
             const size_t nMinRecordSize = nExtraLen + nMinStringLen;
+            assert(nMinRecordSize != 0 && "impossible to be zero");
             const size_t nMaxPossibleStrings = rStrm.remainingSize() / nMinRecordSize;
             if (nStrings > nMaxPossibleStrings)
             {


More information about the Libreoffice-commits mailing list