[poppler] qt4/src
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Jun 24 10:26:41 PDT 2012
qt4/src/poppler-annotation.cc | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit bd1dab39a857b852c09d21f64254ffc1f24c2df0
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 f6341b0..d4f12d4 100644
--- a/qt4/src/poppler-annotation.cc
+++ b/qt4/src/poppler-annotation.cc
@@ -1504,6 +1504,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