[poppler] Branch 'poppler-0.14' - poppler/Gfx.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Oct 23 14:41:56 PDT 2010


 poppler/Gfx.cc |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 2cfcee1e06edea751828ac34e1dbec93536bed31
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Oct 23 22:40:17 2010 +0100

    Check obj2 is a num before reading it

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 4eb8c54..408dab5 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -1252,7 +1252,13 @@ void Gfx::doSoftMask(Object *str, GBool alpha,
   }
   for (i = 0; i < 4; ++i) {
     obj1.arrayGet(i, &obj2);
-    bbox[i] = obj2.getNum();
+    if (likely(obj2.isNum())) bbox[i] = obj2.getNum();
+    else {
+      obj2.free();
+      obj1.free();
+      error(getPos(), "Bad form bounding box (non number)");
+      return;
+    }
     obj2.free();
   }
   obj1.free();


More information about the poppler mailing list