diff options
author | Adam Harvey <aharvey@php.net> | 2015-12-01 03:09:36 +0000 |
---|---|---|
committer | Adam Harvey <aharvey@php.net> | 2015-12-01 03:09:36 +0000 |
commit | 91bad929aa0d7b7560a20c58e1e02a76f522b0bd (patch) | |
tree | 70d86d7605d895c3e1989a6ef3313dfbf3f20d2e /sapi/cli/php_cli_server.c | |
parent | ed4b887cf6e59c12428ebece5492201c63bfbb4f (diff) | |
download | php-git-91bad929aa0d7b7560a20c58e1e02a76f522b0bd.tar.gz |
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.
Diffstat (limited to 'sapi/cli/php_cli_server.c')
-rw-r--r-- | sapi/cli/php_cli_server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index 529f5633bf..3e9bb3af8f 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -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; |