diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-15 20:53:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-16 09:54:41 +0100 |
commit | ec1e5e9573e09ef56cf311fe0531f84c5b75abe4 (patch) | |
tree | eed4646d628f7adddbd07184a616707165d0d4c4 /emfio | |
parent | c74f6d3c64b943e26d5af1850bb55780b60602d6 (diff) |
ofz#4230 Integer-overflow
Change-Id: If7c7591780fe7fa8d6fde3d17b606a4ab0acbf56
Reviewed-on: https://gerrit.libreoffice.org/44794
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
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; } } |