[poppler] poppler/XRef.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Sep 21 16:02:36 UTC 2018


 poppler/XRef.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 554e87a1ea76ce73b4cfe6fca5b9c1bb47502dad
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Sep 21 18:00:24 2018 +0200

    offset from beginning of file can't be < 0

diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 4352146e..078274b4 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -773,10 +773,10 @@ GBool XRef::readXRefStream(Stream *xrefStr, Goffset *pos) {
   }
 
   obj = dict->lookupNF("Prev");
-  if (obj.isInt()) {
+  if (obj.isInt() && obj.getInt() >= 0) {
     *pos = obj.getInt();
     more = gTrue;
-  } else if (obj.isInt64()) {
+  } else if (obj.isInt64() && obj.getInt64() >= 0) {
     *pos = obj.getInt64();
     more = gTrue;
   } else {


More information about the poppler mailing list