diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-23 15:06:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-24 10:21:15 +0100 |
commit | f50e94a36bf21f9f1cef52be980a6bf92faf4f03 (patch) | |
tree | c936039e2e715cba95399657641b3140ecffca22 /xmloff | |
parent | 897dd277d2ae418833835a2dbcb8cbdbc1676d49 (diff) |
ofz#5621 Integer-overflow
Change-Id: I98f93101dc287b2ef285f3d9547d44dd06d2fe01
Reviewed-on: https://gerrit.libreoffice.org/48429
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.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 02f1b2ec8108..5b6523a6ea5a 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -1083,9 +1083,9 @@ void SdXMLLineShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib pOuterSequence->realloc(2); awt::Point* pInnerSequence = pOuterSequence->getArray(); - *pInnerSequence = awt::Point( mnX1 - aTopLeft.X, mnY1 - aTopLeft.Y); + *pInnerSequence = awt::Point(o3tl::saturating_add(mnX1, -aTopLeft.X), o3tl::saturating_add(mnY1, -aTopLeft.Y)); pInnerSequence++; - *pInnerSequence = awt::Point( mnX2 - aTopLeft.X, mnY2 - aTopLeft.Y); + *pInnerSequence = awt::Point(o3tl::saturating_add(mnX2, -aTopLeft.X), o3tl::saturating_add(mnY2, -aTopLeft.Y)); xPropSet->setPropertyValue("Geometry", Any(aPolyPoly)); } |