diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-25 17:16:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-26 13:19:59 +0100 |
commit | 013a4f951c016c7e266392a91e37a123c6d49a25 (patch) | |
tree | d92e76eefad7c3f56c8646cf749a3a0d242ed3af /xmloff/source | |
parent | d79c1e3c6eed70c221db8a82d061261d4835f618 (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/source')
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 5 |
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); - } |