summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-16 11:08:27 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-07-16 13:35:46 +0200
commitf3e71b3b730eabc2b12871b3a19dad815219bcb9 (patch)
treed6a089a10318f742f5393c1db9a68055b15958a2
parent0ed5c4aecfb0c2dc3ad53bcec23538c95de06425 (diff)
downloadphp-git-f3e71b3b730eabc2b12871b3a19dad815219bcb9.tar.gz
Fixed bug #78297
(cherry picked from commit 8a19fe29de77d7477d59db472dd6aadabd5ac249)
-rw-r--r--NEWS5
-rw-r--r--sapi/phpdbg/phpdbg_list.c1
-rw-r--r--sapi/phpdbg/tests/bug78297.phpt16
3 files changed, 22 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index ae6a3c5405..76e8f830a0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+?? ??? ????, PHP 7.3.8
+
+- Phpdbg:
+ . Fixed bug #78297 (Include unexistent file memory leak). (Nikita)
+
18 Jul 2019, PHP 7.3.8RC1
- Core:
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>