[poppler] poppler/Form.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Fri Oct 5 02:35:23 PDT 2007


 poppler/Form.cc |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
diff-tree 3156d560c5eaf6970da422d0b09fd2e95bfe6d1d (from f0b5e6286e94c6153c8247b5fae63a18622c48d3)
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Fri Oct 5 11:34:01 2007 +0200

    Fix a crash when Form Fields array contains references
    to non existent objects. Fixes bug #11865

diff --git a/poppler/Form.cc b/poppler/Form.cc
index ffa51b9..022bdb1 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -1082,9 +1082,18 @@ Form::Form(XRef *xrefA, Object* acroForm
       array->getNF(i, &oref);
       if (!oref.isRef()) {
         error(-1, "Direct object in rootFields");
+	obj1.free();
+	oref.free();
         continue;
       }
 
+      if (!obj1.isDict()) {
+        error(-1, "Reference in Fields array to an invalid or non existant object");
+	obj1.free();
+	oref.free();
+	continue;
+      }
+
       if (numFields >= size) {
         size += 16;
         rootFields = (FormField**)greallocn(rootFields,size,sizeof(FormField*));


More information about the poppler mailing list