[Libreoffice-commits] libmspub.git: src/lib

David Tardon dtardon at redhat.com
Fri Jan 19 09:20:17 UTC 2018


 src/lib/MSPUBParser.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5cd502a195c713c1d64efcaa5ebc82cd422a5f5e
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Jan 19 10:18:52 2018 +0100

    ofz#5224 avoid signed integer overflow
    
    Change-Id: I0110730e2d3e8bc329b0599554fa4017d7a214f0

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 30b6e7d..05e0e11 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1972,8 +1972,8 @@ void MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input, const Esc
           {
             int initialX = absolute.m_xs;
             int initialY = absolute.m_ys;
-            int initialWidth = absolute.m_xe - absolute.m_xs;
-            int initialHeight = absolute.m_ye - absolute.m_ys;
+            int initialWidth = int64_t(absolute.m_xe) - absolute.m_xs;
+            int initialHeight = int64_t(absolute.m_ye) - absolute.m_ys;
             int centerX = initialX + initialWidth / 2;
             int centerY = initialY + initialHeight / 2;
             int xs = centerX - initialHeight / 2;


More information about the Libreoffice-commits mailing list