[Libreoffice-commits] core.git: xmloff/source

Caolán McNamara caolanm at redhat.com
Fri Jan 26 12:20:25 UTC 2018


 xmloff/source/draw/ximpshap.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 013a4f951c016c7e266392a91e37a123c6d49a25
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 25 17:16:44 2018 +0000

    ofz#5621 Integer-overflow
    
    Change-Id: I621fb776457054f82078ed483c8b247acf734a3a
    Reviewed-on: https://gerrit.libreoffice.org/48630
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 5b6523a6ea5a..616dec4d1ba2 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1091,8 +1091,8 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
     }
 
     // set sizes for transformation
-    maSize.Width = aBottomRight.X - aTopLeft.X;
-    maSize.Height = aBottomRight.Y - aTopLeft.Y;
+    maSize.Width = o3tl::saturating_add(aBottomRight.X, -aTopLeft.X);
+    maSize.Height = o3tl::saturating_add(aBottomRight.Y, -aTopLeft.Y);
     maPosition.X = aTopLeft.X;
     maPosition.Y = aTopLeft.Y;
 
@@ -1100,7 +1100,6 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
     SetTransformation();
 
     SdXMLShapeContext::StartElement(xAttrList);
-
 }
 
 


More information about the Libreoffice-commits mailing list