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

David Tardon dtardon at redhat.com
Tue Feb 20 08:32:17 UTC 2018


 src/lib/MSPUBParser.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9f49ab526414275f711c6669f6e39f737654bdac
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Feb 20 09:31:06 2018 +0100

    ofz#6410 avoid signed integer overflow
    
    Change-Id: Ife08fdb17a58e6fd32a967a1a553c1d346689209

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;


More information about the Libreoffice-commits mailing list