[poppler] poppler/Catalog.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Nov 24 13:52:18 PST 2010


 poppler/Catalog.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d915f3d5a9e9e2e5dcd6be4cf8fac1b5849a13e9
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 24 21:51:46 2010 +0000

    protect against null ref here

diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
index 664d18a..0beee76 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -385,7 +385,7 @@ int Catalog::findPage(int num, int gen) {
 
   for (i = 0; i < getNumPages(); ++i) {
     Ref *ref = getPageRef(i+1);
-    if (ref->num == num && ref->gen == gen)
+    if (ref != NULL && ref->num == num && ref->gen == gen)
       return i + 1;
   }
   return 0;


More information about the poppler mailing list