[poppler] poppler/Lexer.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon May 21 23:09:19 UTC 2018


 poppler/Lexer.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 127d0fe3a209b04fc9efb086d423bca4ba359dca
Author: Albert Astals Cid <aacid at kde.org>
Date:   Tue May 22 01:08:12 2018 +0200

    Fix overflownLongLong check
    
    We actually want integer math here since doubles lose the precision we
    want at that high long long values

diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc
index a5090838..9ae19c34 100644
--- a/poppler/Lexer.cc
+++ b/poppler/Lexer.cc
@@ -206,7 +206,7 @@ Object Lexer::getObj(int objNum) {
 	  xf = xf * 10.0 + (c - '0');
 	} else if (unlikely (overflownInteger)) {
 	  if (unlikely(xll > LongLongSafeLimit) &&
-	      (xll > (LLONG_MAX - (c - '0')) / 10.0)) {
+	      (xll > (LLONG_MAX - (c - '0')) / 10)) {
 	    overflownLongLong = gTrue;
 	    xf = xll * 10.0 + (c - '0');
 	  } else {


More information about the poppler mailing list