summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-04-25 19:42:15 +0200
committerAlbert Astals Cid <aacid@kde.org>2017-04-25 19:42:15 +0200
commit278439531b13b0b047dbe3a75aa3f1b3407c8bd4 (patch)
tree56132f87d1fb218e72881684b7aba6a77abb30dc
parent478be219772a6c298baad568da3643895cd50d35 (diff)
Fix memory leak (and probably logic bug) parsing broken XRef entries
Don't need to get obj1 again to ask if it's an int64 instead of an int Bug #100775
-rw-r--r--poppler/XRef.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index e4caaab7..c141bbfe 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1606,8 +1606,7 @@ GBool XRef::parseEntry(Goffset offset, XRefEntry *entry)
str->makeSubStream(offset, gFalse, 20, &obj)), gTrue);
Object obj1, obj2, obj3;
- if (((parser.getObj(&obj1)->isInt()) ||
- parser.getObj(&obj1)->isInt64()) &&
+ if (((parser.getObj(&obj1)->isInt()) || obj1.isInt64()) &&
(parser.getObj(&obj2)->isInt()) &&
(parser.getObj(&obj3)->isCmd("n") || obj3.isCmd("f"))) {
if (obj1.isInt64())