From 6a880bbc34790b619986602a921d734995fdf1c0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 24 Oct 2017 10:37:39 +0100 Subject: ofz Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8219dfa79565601681bc236789b0b18886c4f311 Reviewed-on: https://gerrit.libreoffice.org/43745 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- emfio/source/reader/mtftools.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'emfio') 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 #include #include +#include #include #include #include @@ -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() ); } -- cgit v1.2.3