summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-27 13:28:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-27 16:13:53 +0200
commit91263493eac70464fa6036cf9d8676e5ed452869 (patch)
treeac125e588b6c6677a7c2ad2e0e1d7eab3221613c /tools
parent540d5e00714feef70d896d8856dc33db694e6e4b (diff)
ofz#3802 Integer-overflow
Change-Id: Id631951119ed0a6b62ffe7d8342cd92191714114 Reviewed-on: https://gerrit.libreoffice.org/43943 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/bigint.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index bef8de9f7a9e..a9b8eca1b97f 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -334,7 +334,7 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) const
nQ = (sal_uInt16)(((sal_uInt32)nTmp) / aTmpB.nNum[nLenB1]);
if ( ((sal_uInt32)aTmpB.nNum[nLenB1 - 1] * nQ) >
- ((((sal_uInt32)nTmp) - aTmpB.nNum[nLenB1] * nQ) << 16) + aTmpA.nNum[j - 2])
+ ((((sal_uInt32)nTmp) - (sal_uInt32)aTmpB.nNum[nLenB1] * nQ) << 16) + aTmpA.nNum[j - 2])
nQ--;
// Start division
nK = 0;