diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-02 09:34:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-02 14:25:27 +0100 |
commit | cc6128d727d1e92b2aa2b4dd9cbae8e045cf1f6b (patch) | |
tree | 839badd6ae833444076f18eec91c3fd0883cdea0 /svx | |
parent | a95416ecf8d3c5b85e5e81e11aed95fe8ef41038 (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.cxx | 4 |
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; |