Kaydet (Commit) cc6128d7 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3886 Integer-overflow

Change-Id: I936f681b835cca62fc14a326b7ae5cb062b3f1df
Reviewed-on: https://gerrit.libreoffice.org/44197Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a95416ec
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment