[Libreoffice-commits] core.git: xmloff/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 24 09:21:38 UTC 2018
xmloff/source/draw/ximpshap.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit f50e94a36bf21f9f1cef52be980a6bf92faf4f03
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 23 15:06:28 2018 +0000
ofz#5621 Integer-overflow
Change-Id: I98f93101dc287b2ef285f3d9547d44dd06d2fe01
Reviewed-on: https://gerrit.libreoffice.org/48429
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 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));
}
More information about the Libreoffice-commits
mailing list