emfio/source/reader/mtftools.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 6a880bbc34790b619986602a921d734995fdf1c0
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Oct 24 10:37:39 2017 +0100

    ofz Integer-overflow
    
    Change-Id: I8219dfa79565601681bc236789b0b18886c4f311
    Reviewed-on: https://gerrit.libreoffice.org/43745
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

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() );
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to