diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 11:50:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-22 21:03:24 +0100 |
commit | 2bd04d18e8558ff16ba4c28e4e9c0c3f7fc1b86c (patch) | |
tree | d9451ac8af6affb7b2ee8174e5de5d1d25fadb31 /sw | |
parent | 05fea7061592221973fcc5018850113d577df57a (diff) |
cid#1242653 silence bogus Untrusted divisor
Change-Id: I1555754d156b3b8a2143ab179cfde8302d81e46c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112888
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |