]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.2' into PHP-7.3
authorXinchen Hui <laruence@gmail.com>
Thu, 14 Mar 2019 08:46:46 +0000 (16:46 +0800)
committerXinchen Hui <laruence@gmail.com>
Thu, 14 Mar 2019 08:46:46 +0000 (16:46 +0800)
* PHP-7.2:
  Fixed bug #77738 (Nullptr deref in zend_compile_expr)

1  2 
Zend/zend_compile.c

index 90679c8cc954c6d94334b09ab2a5446961da4b2d,a91dfeeecfea9f8f2c878d3092e2c23d8a4203c9..284b92ea6e6523bb652483d8bee144f547a3feb7
@@@ -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;
                }
        }