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

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


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

New commits:
commit f3f9d8f28a97338da92c842d5668b0ef3495ef13
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