[poppler] poppler/Gfx.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Jun 10 10:10:40 PDT 2012


 poppler/Gfx.cc |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d791101fbdebf7a3b3f333939f9bbff6bbecf45f
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Jun 10 19:09:17 2012 +0200

    Do use NULL function
    
    Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael Coldwind

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 5c788fb..d7684d6 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -1158,8 +1158,9 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
 	  funcs[0] = NULL;
 	} else {
 	  funcs[0] = Function::parse(&obj3);
-	  if (funcs[0]->getInputSize() != 1 ||
-	      funcs[0]->getOutputSize() != 1) {
+      if (funcs[0] == NULL ||
+          funcs[0]->getInputSize() != 1 ||
+          funcs[0]->getOutputSize() != 1) {
 	    error(errSyntaxError, getPos(),
 		  "Invalid transfer function in soft mask in ExtGState");
 	    delete funcs[0];


More information about the poppler mailing list