From 278439531b13b0b047dbe3a75aa3f1b3407c8bd4 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid <aacid@kde.org> Date: Tue, 25 Apr 2017 19:42:15 +0200 Subject: 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 diff --git a/poppler/XRef.cc b/poppler/XRef.cc index e4caaab..c141bbf 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()) -- cgit v0.10.2