authorAlbert Astals Cid <>2010-09-21 18:11:42 (GMT)
committer Albert Astals Cid <>2010-09-21 18:11:42 (GMT)
commit473de6f88a055bb03470b4af5fa584be8cb5fda4 (patch) (side-by-side diff)
parent9706e28657ff7ea52aa69d9efb3f91d0cfaee70b (diff)
Fix memory leak if obj2 is not a dict
Found thanks to PDF provided by Joel Voss of Leviathan Security Group
Diffstat (more/less context) (ignore whitespace changes)
1 files changed, 3 insertions, 2 deletions
diff --git a/poppler/ b/poppler/
index 4df8a7d..21ca672 100644
--- a/poppler/
+++ b/poppler/
@@ -715,13 +715,14 @@ FormField::FormField(XRef* xrefA, Object *aobj, const Ref& aref, FormFieldType t
// Load children
for(int i=0; i<length; i++) {
Object obj2,obj3;
- Object childRef;
array->get(i, &obj2);
- array->getNF(i, &childRef);
if (!obj2.isDict ()) {
error (-1, "Reference to an invalid or non existant object");
+ Object childRef;
+ array->getNF(i, &childRef);
//field child
if (dict->lookup ("FT", &obj3)->isName()) {
// If I'm not a generic container field and my children