[poppler] poppler/Parser.cc poppler/Parser.h poppler/XRef.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Nov 29 12:51:08 PST 2010


 poppler/Parser.cc |    7 ++++++-
 poppler/Parser.h  |    1 +
 poppler/XRef.cc   |    6 +++---
 3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 62ec4f591c258e702ee79b519919a931517220bf
Author: Albert Astals Cid <aacid at kde.org>
Date:   Mon Nov 29 20:50:43 2010 +0000

    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 at kde.org>
+// Copyright (C) 2006, 2009, 201, 2010 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk at gmail.com>
 // Copyright (C) 2009 Ilya Gorenbein <igorenbein at finjan.com>
 //
@@ -59,6 +59,11 @@ Object *Parser::getObj(Object *obj, Guchar *fileKey,
   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 @@ public:
      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 @@ Object *XRef::fetch(int num, int gen, Object *obj, std::set<int> *fetchOriginato
 	       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")) {


More information about the poppler mailing list