summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2018-02-20 09:31:06 +0100
committerDavid Tardon <dtardon@redhat.com>2018-02-20 09:31:06 +0100
commit9f49ab526414275f711c6669f6e39f737654bdac (patch)
tree5e2cc8e6a1e99b69f755a1c4a2515161adf03d26
parent2be062bd914c000899a03822664f9a523d435f3e (diff)
ofz#6410 avoid signed integer overflow
Change-Id: Ife08fdb17a58e6fd32a967a1a553c1d346689209
-rw-r--r--src/lib/MSPUBParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 1f6fa95..883cf67 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1954,7 +1954,7 @@ void MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input, const Esc
else if (cAnchor.type == OFFICE_ART_CHILD_ANCHOR)
{
input->seek(cAnchor.contentsOffset, librevenge::RVNG_SEEK_SET);
- int coordSystemWidth = thisParentCoordinateSystem.m_xe - thisParentCoordinateSystem.m_xs;
+ int coordSystemWidth = int64_t(thisParentCoordinateSystem.m_xe) - thisParentCoordinateSystem.m_xs;
if (coordSystemWidth == 0)
coordSystemWidth = 1;
int coordSystemHeight = thisParentCoordinateSystem.m_ye - thisParentCoordinateSystem.m_ys;