From: Xinchen Hui Date: Thu, 14 Mar 2019 08:46:46 +0000 (+0800) Subject: Merge branch 'PHP-7.2' into PHP-7.3 X-Git-Tag: php-7.3.4RC1~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3965913c41836eef0583089bafb0a29fa53dec2;p=php Merge branch 'PHP-7.2' into PHP-7.3 * PHP-7.2: Fixed bug #77738 (Nullptr deref in zend_compile_expr) --- e3965913c41836eef0583089bafb0a29fa53dec2 diff --cc Zend/zend_compile.c index 90679c8cc9,a91dfeeecf..284b92ea6e --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@@ -7765,10 -7677,10 +7765,10 @@@ void zend_compile_const(znode *result, zend_ast_list *list = zend_ast_get_list(last); last = list->child[list->children-1]; } - if (last->kind == ZEND_AST_HALT_COMPILER) { + if (last && last->kind == ZEND_AST_HALT_COMPILER) { result->op_type = IS_CONST; ZVAL_LONG(&result->u.constant, Z_LVAL_P(zend_ast_get_zval(last->child[0]))); - zend_string_release(resolved_name); + zend_string_release_ex(resolved_name, 0); return; } }