diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-16 11:10:02 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-07-16 11:10:51 +0200 |
commit | eea9d617636c69d265b698088777469fdd65862d (patch) | |
tree | ca99d65805c98880a2a923a3b40347ad236e3f65 /sapi/phpdbg | |
parent | bf1ace7dd3fb430245b66cfe3813bc29a5ccb83a (diff) | |
parent | 8a19fe29de77d7477d59db472dd6aadabd5ac249 (diff) | |
download | php-git-eea9d617636c69d265b698088777469fdd65862d.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
Diffstat (limited to 'sapi/phpdbg')
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 1 | ||||
-rw-r--r-- | sapi/phpdbg/tests/bug78297.phpt | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index aab641cb56..a9b0f4b815 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -248,6 +248,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) { } else { zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file->filename); } + return NULL; } data.buf = estrndup(bufptr, len); diff --git a/sapi/phpdbg/tests/bug78297.phpt b/sapi/phpdbg/tests/bug78297.phpt new file mode 100644 index 0000000000..47b13ad605 --- /dev/null +++ b/sapi/phpdbg/tests/bug78297.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #78297: Include unexistent file memory leak +--PHPDBG-- +r +q +--FILE-- +<?php +include "does_not_exist.php"; +--EXPECTF-- +[Successful compilation of %s] +prompt> +Warning: include(%s): failed to open stream: No such file or directory in %s on line %d + +Warning: include(): Failed opening 'does_not_exist.php' for inclusion (include_path=%s) in %s on line %d +[Script ended normally] +prompt> |