[Libreoffice-commits] core.git: emfio/source
Caolán McNamara
caolanm at redhat.com
Thu Nov 16 08:55:01 UTC 2017
emfio/source/reader/mtftools.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit ec1e5e9573e09ef56cf311fe0531f84c5b75abe4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 15 20:53:35 2017 +0000
ofz#4230 Integer-overflow
Change-Id: If7c7591780fe7fa8d6fde3d17b606a4ab0acbf56
Reviewed-on: https://gerrit.libreoffice.org/44794
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index c6bbfa745b9a..24222eb2d0fe 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -2072,8 +2072,14 @@ namespace emfio
}
else if ( mnMapMode == MM_HIMETRIC )
{
- mnWinExtX = mnMillX * 100;
- mnWinExtY = mnMillY * 100;
+ sal_Int32 nWinExtX, nWinExtY;
+ if (o3tl::checked_multiply<sal_Int32>(mnMillX, 100, nWinExtX) ||
+ o3tl::checked_multiply<sal_Int32>(mnMillY, 100, nWinExtY))
+ {
+ return;
+ }
+ mnWinExtX = nWinExtX;
+ mnWinExtY = nWinExtY;
}
}
More information about the Libreoffice-commits
mailing list