[Libreoffice-commits] libmspub.git: src/lib
David Tardon
dtardon at redhat.com
Sat Jan 20 14:30:31 UTC 2018
src/lib/MSPUBParser.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 875a2afea73aaea306fb757dc2533c26686206f6
Author: David Tardon <dtardon at redhat.com>
Date: Sat Jan 20 15:30:01 2018 +0100
ofz#5515 avoid signed integer overflow
Change-Id: I80207d028bd5348e4f53b8888f7deec1eb48e6c2
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 05e0e11..d838d5d 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1957,8 +1957,8 @@ void MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input, const Esc
int coordSystemHeight = thisParentCoordinateSystem.m_ye - thisParentCoordinateSystem.m_ys;
if (coordSystemHeight == 0)
coordSystemHeight = 1;
- int groupWidth = parentGroupAbsoluteCoord.m_xe - parentGroupAbsoluteCoord.m_xs;
- int groupHeight = parentGroupAbsoluteCoord.m_ye - parentGroupAbsoluteCoord.m_ys;
+ int groupWidth = int64_t(parentGroupAbsoluteCoord.m_xe) - parentGroupAbsoluteCoord.m_xs;
+ int groupHeight = int64_t(parentGroupAbsoluteCoord.m_ye) - parentGroupAbsoluteCoord.m_ys;
double widthScale = (double)groupWidth / coordSystemWidth;
double heightScale = (double)groupHeight / coordSystemHeight;
int xs = (readU32(input) - thisParentCoordinateSystem.m_xs) * widthScale + parentGroupAbsoluteCoord.m_xs;
More information about the Libreoffice-commits
mailing list