poppler/XRef.cc |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 1f8ab328f1440721fe7be7615a9d965a6e3d0439
Author: Albert Astals Cid <[email protected]>
Date:   Thu Aug 9 00:40:14 2018 +0200

    XRef::readXRef: Fix possible integer overflow
    
    fixes oss-fuzz/9777

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 6eadc0a1..8d13be03 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -509,6 +509,11 @@ GBool XRef::readXRef(Goffset *pos, std::vector<Goffset> 
*followedXRefStm, std::v
   Object obj;
   GBool more;
 
+  if (unlikely(start > (LONG_LONG_MAX - *pos))) {
+    ok = gFalse;
+    return gFalse;
+  }
+
   // start up a parser, parse one token
   parser = new Parser(nullptr,
             new Lexer(nullptr,
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to