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

ofz#4055 Integer-overflow

Change-Id: I15f0a48c1e0c4c03f99a74d4d9b58e064d108c72
Reviewed-on: https://gerrit.libreoffice.org/44304Tested-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 393fa77d
......@@ -2004,9 +2004,10 @@ namespace emfio
{
if ( mnMapMode == MM_ISOTROPIC ) //TODO: WHAT ABOUT ANISOTROPIC???
{
Size aSize( (mnWinExtX + mnWinOrgX) >> MS_FIXPOINT_BITCOUNT_28_4,
-((mnWinExtY - mnWinOrgY) >> MS_FIXPOINT_BITCOUNT_28_4));
sal_Int32 nX, nY;
if (o3tl::checked_add(mnWinExtX, mnWinOrgX, nX) || o3tl::checked_sub(mnWinExtY, mnWinOrgY, nY))
return;
Size aSize(nX >> MS_FIXPOINT_BITCOUNT_28_4, -(nY >> MS_FIXPOINT_BITCOUNT_28_4));
SetDevExt(aSize, false);
}
}
......
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