summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-25 17:16:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-26 13:19:59 +0100
commit013a4f951c016c7e266392a91e37a123c6d49a25 (patch)
treed92e76eefad7c3f56c8646cf749a3a0d242ed3af /xmloff
parentd79c1e3c6eed70c221db8a82d061261d4835f618 (diff)
ofz#5621 Integer-overflow
Change-Id: I621fb776457054f82078ed483c8b247acf734a3a Reviewed-on: https://gerrit.libreoffice.org/48630 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 'xmloff')
-rw-r--r--xmloff/source/draw/ximpshap.cxx5
1 files changed, 2 insertions, 3 deletions
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);
-
}