summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-14 17:22:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-08-14 19:40:21 +0200
commit175a313744e66325053f962ff7a65213e48ebb36 (patch)
treedcc647311e3ca25dd68a9b482c328dd2ef813f02
parentd51c383b0204057e1b341db2d38b6d2dbb0c84e8 (diff)
cid#1490212 silence Untrusted divisor
"The divisor could be controlled by an attacker, who could cause a division by zero." but this division can only happen if the divisor is either 8 or 4 Change-Id: I7cae93f48d84e023912b8613be89cf9db5589d4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120489 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 3cd81b1c95eb..e26df0532845 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1024,9 +1024,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
bool bOk = false;
if (nNumElemVert && (nElemSizeVert == 8 || nElemSizeVert == 4))
{
- assert(nElemSizeVert == 8 || nElemSizeVert == 4);
//check if there is enough data in the file to make the
//record sane
+ // coverity[tainted_data : FALSE] - nElemSizeVert is either 8 or 4 so it has been sanitized
bOk = rSt.remainingSize() / nElemSizeVert >= nNumElemVert;
}
if (bOk)