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

David Tardon dtardon at redhat.com
Mon Oct 2 08:14:33 UTC 2017


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

New commits:
commit ac0a548902be9d7c4d4662d64bfcf0d018ada3dc
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Oct 2 10:13:44 2017 +0200

    ofz#2825 avoid signed integer overflow
    
    Change-Id: Id075e90ed5c4dca1ba14ffb01626d488414e4576

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 0cb0e28..be9f9c1 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1407,7 +1407,7 @@ CharacterStyle MSPUBParser::getCharacterStyle(librevenge::RVNGInputStream *input
   boost::optional<double> dTextSize;
   if (textSize1 != -1)
   {
-    dTextSize = (double)(textSize1 * POINTS_IN_INCH) / EMUS_IN_INCH;
+    dTextSize = textSize1 * (double(POINTS_IN_INCH) / EMUS_IN_INCH);
   }
   return CharacterStyle(seenUnderline, seenItalic1 && seenItalic2, seenBold1 && seenBold2, dTextSize, getColorIndexByQuillEntry(colorIndex), fontIndex, sst);
 }


More information about the Libreoffice-commits mailing list