summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-02 09:34:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-02 14:25:27 +0100
commitcc6128d727d1e92b2aa2b4dd9cbae8e045cf1f6b (patch)
tree839badd6ae833444076f18eec91c3fd0883cdea0 /svx
parenta95416ecf8d3c5b85e5e81e11aed95fe8ef41038 (diff)
ofz#3886 Integer-overflow
Change-Id: I936f681b835cca62fc14a326b7ae5cb062b3f1df Reviewed-on: https://gerrit.libreoffice.org/44197 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/tablelayouter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 63ca7b8c1bcc..4823f6a8ef92 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -472,11 +472,11 @@ sal_Int32 TableLayouter::distribute( LayoutVector& rLayouts, sal_Int32 nDistribu
if (nIndex != (nCount-1))
{
bConstrainsBroken |= o3tl::checked_multiply(nDistribute, rLayout.mnSize, n);
- n /= nCurrentWidth;
+ n /= nCurrentWidth;
}
+ bConstrainsBroken |= o3tl::checked_add(rLayout.mnSize, n, rLayout.mnSize);
nDistributed -= n;
- rLayout.mnSize += n;
if( rLayout.mnSize < rLayout.mnMinSize )
bConstrainsBroken = true;