sw/source/filter/ww8/ww8scan.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 2bd04d18e8558ff16ba4c28e4e9c0c3f7fc1b86c
Author: Caolán McNamara <[email protected]>
AuthorDate: Mon Mar 22 11:50:10 2021 +0000
Commit: Caolán McNamara <[email protected]>
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 <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
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)
{
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits