[poppler] Branch 'poppler-0.10' - poppler/Outline.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Dec 11 14:18:48 PST 2008


 poppler/Outline.cc |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 2dac82beab5d78102eb66295826aa4cf439d77cf
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu Dec 11 23:15:45 2008 +0100

    Fix crash when reading outline
    
    Fixes bug 19024. Last as reference is required if the item has children (Table 8.4) so if there is no last reference, don't try to read children.

diff --git a/poppler/Outline.cc b/poppler/Outline.cc
index 630dae4..8a2a791 100644
--- a/poppler/Outline.cc
+++ b/poppler/Outline.cc
@@ -14,6 +14,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2005 Marco Pesenti Gritti <mpg at redhat.com>
+// Copyright (C) 2008 Albert Astals Cid <aacid at kde.org>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -132,6 +133,9 @@ GooList *OutlineItem::readItemList(Object *firstItemRef, Object *lastItemRef,
   Object obj;
   Object *p;
 
+  if (!lastItemRef->isRef())
+    return NULL;
+
   items = new GooList();
   p = firstItemRef;
   while (p->isRef()) {


More information about the poppler mailing list