Fix bug #71005 (Segfault in php_cli_server_dispatch_router()).

We didn't initialise the retval variable in
php_cli_server_dispatch_router(); let's now initialise it to be
IS_UNDEF, as the following if condition expects.
This commit is contained in:
Adam Harvey 2015-12-01 03:09:36 +00:00
parent ed4b887cf6
commit 91bad929aa
3 changed files with 51 additions and 0 deletions

View file

@ -2050,6 +2050,8 @@ static int php_cli_server_dispatch_router(php_cli_server *server, php_cli_server
zend_try {
zval retval;
ZVAL_UNDEF(&retval);
if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE, &retval, 1, &zfd)) {
if (Z_TYPE(retval) != IS_UNDEF) {
decline = Z_TYPE(retval) == IS_FALSE;