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

ofz#4057 Integer-overflow

Change-Id: I6a7ef3ca4c26ce4965deeea27ae47a03169bcf12
Reviewed-on: https://gerrit.libreoffice.org/44320Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 92ca905b
......@@ -96,8 +96,10 @@ bool XMLShadowPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue
aShadow.Location = table::ShadowLocation_BOTTOM_RIGHT;
}
if( nX < 0 ) nX *= -1;
if( nY < 0 ) nY *= -1;
if (nX < 0)
nX = o3tl::saturating_toggle_sign(nX);
if (nY < 0)
nY = o3tl::saturating_toggle_sign(nY);
sal_Int32 nWidth;
bRet = !o3tl::checked_add(nX, nY, nWidth);
......
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