[poppler] Branch 'poppler-0.20' - qt4/src

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Jun 24 10:27:00 PDT 2012


 qt4/src/poppler-annotation.cc |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 6cdf879e389f05abba30b3fad8083b7fff23056e
Author: Fabio D'Urso <fabiodurso at hotmail.it>
Date:   Sun Jun 24 11:48:04 2012 +0200

    qt4: Do not hang on malformed /Annots objects
    
    Don't recurse infinitely if the /Annots object contains annotation
    dictionaries (according to specs, /Annots must contain *references*
    to annotation dictionaries).
    
    Fixes bug #51361

diff --git a/qt4/src/poppler-annotation.cc b/qt4/src/poppler-annotation.cc
index 77bbf90..67dbbae 100644
--- a/qt4/src/poppler-annotation.cc
+++ b/qt4/src/poppler-annotation.cc
@@ -1512,6 +1512,11 @@ QList<Annotation*> Annotation::revisions() const
         return res;
     }
 
+    /* If the annotation doesn't live in a object on its own (eg bug51361), it
+     * has no ref, therefore it can't have revisions */
+    if ( !d->pdfAnnot->getHasRef() )
+        return QList<Annotation*>();
+
     return AnnotationPrivate::findAnnotations( d->pdfPage, d->parentDoc, d->pdfAnnot->getId() );
 }
 


More information about the poppler mailing list