Commit 554e87a1 authored by Albert Astals Cid's avatar Albert Astals Cid

offset from beginning of file can't be < 0

parent 06c344cc
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment