diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-24 10:37:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-24 18:22:23 +0200 |
commit | 6a880bbc34790b619986602a921d734995fdf1c0 (patch) | |
tree | ed949e153f5ca740e272e3de1bcb68de7d021494 /emfio | |
parent | b184a8734f0abd7fd2b1d450a4119ecbaca41589 (diff) |
ofz Integer-overflow
Change-Id: I8219dfa79565601681bc236789b0b18886c4f311
Reviewed-on: https://gerrit.libreoffice.org/43745
Tested-by: Jenkins <ci@libreoffice.org>
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 96558d882ca4..399c453c0a9a 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -31,6 +31,7 @@ #include <rtl/tencinfo.h> #include <vcl/virdev.hxx> #include <o3tl/make_unique.hxx> +#include <o3tl/safeint.hxx> #include <officecfg/Setup.hxx> #include <officecfg/Office/Linguistic.hxx> #include <unotools/configmgr.hxx> @@ -518,7 +519,9 @@ namespace emfio rFont.SetFontSize( aFontSize ); - if( ( mnWinExtX * mnWinExtY ) < 0 ) + sal_Int32 nResult; + const bool bFail = o3tl::checked_multiply(mnWinExtX, mnWinExtY, nResult); + if (!bFail && nResult < 0) rFont.SetOrientation( 3600 - rFont.GetOrientation() ); } |