From: Dmitry Stogov Date: Thu, 1 Feb 2007 15:23:46 +0000 (+0000) Subject: Fixed possible crash because of dereference of NULL X-Git-Tag: php-5.2.1~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed30d91cd602459478826f52f2b59c05efad3402;p=php Fixed possible crash because of dereference of NULL --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 6d2338622f..713c18305a 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1685,17 +1685,13 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) if (expr) { opline->op1 = *expr; - } else { - opline->op1.op_type = IS_CONST; - INIT_ZVAL(opline->op1.u.constant); - } - if (do_end_vparse) { - if (zend_is_function_or_method_call(expr)) { + if (do_end_vparse && zend_is_function_or_method_call(expr)) { opline->extended_value = ZEND_RETURNS_FUNCTION; - } else { - opline->extended_value = 0; } + } else { + opline->op1.op_type = IS_CONST; + INIT_ZVAL(opline->op1.u.constant); } SET_UNUSED(opline->op2);