pass fetchOriginatorNums in some more calls
Fixes some more crashes in broken files
diff --git a/poppler/Parser.cc b/poppler/Parser.cc
index 85383cc..34a8286 100644
--- a/poppler/Parser.cc
+++ b/poppler/Parser.cc
@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
-// Copyright (C) 2006, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006, 2009, 201, 2010 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
//
@@ -59,6 +59,11 @@
return getObj(obj, fileKey, encAlgorithm, keyLength, objNum, objGen, &fetchOriginatorNums);
}
+Object *Parser::getObj(Object *obj, std::set<int> *fetchOriginatorNums)
+{
+ return getObj(obj, NULL, cryptRC4, 0, 0, 0, fetchOriginatorNums);
+}
+
Object *Parser::getObj(Object *obj, Guchar *fileKey,
CryptAlgorithm encAlgorithm, int keyLength,
int objNum, int objGen, std::set<int> *fetchOriginatorNums) {
diff --git a/poppler/Parser.h b/poppler/Parser.h
index d9dc63e..3d8a831 100644
--- a/poppler/Parser.h
+++ b/poppler/Parser.h
@@ -51,6 +51,7 @@
CryptAlgorithm encAlgorithm, int keyLength,
int objNum, int objGen, std::set<int> *fetchOriginatorNums);
+ Object *getObj(Object *obj, std::set<int> *fetchOriginatorNums);
// Get stream.
Stream *getStream() { return lexer->getStream(); }
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index dd7950f..970a00b 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -1002,9 +1002,9 @@
new Lexer(this,
str->makeSubStream(start + e->offset, gFalse, 0, &obj1)),
gTrue);
- parser->getObj(&obj1);
- parser->getObj(&obj2);
- parser->getObj(&obj3);
+ parser->getObj(&obj1, fetchOriginatorNums);
+ parser->getObj(&obj2, fetchOriginatorNums);
+ parser->getObj(&obj3, fetchOriginatorNums);
if (!obj1.isInt() || obj1.getInt() != num ||
!obj2.isInt() || obj2.getInt() != gen ||
!obj3.isCmd("obj")) {