summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-06-27 14:21:49 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-06-27 14:21:49 +0200
commit5918171f9564015f8128b5747bc389c198ddfc14 (patch)
treed73241530863fef3fb92188c9417392c7f2e4e62 /sapi/phpdbg/phpdbg_prompt.c
parentbfaea352537d33aed7efb973c570463f3c1ead5d (diff)
parentc3132781ecb7b6ff9ca4c8ccb64847fdeb26d2f4 (diff)
downloadphp-git-5918171f9564015f8128b5747bc389c198ddfc14.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 3a96898066..238ad0a4c1 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -421,7 +421,7 @@ PHPDBG_COMMAND(exec) /* {{{ */
if (PHPDBG_G(exec)) {
phpdbg_notice("exec", "type=\"unset\" context=\"%s\"", "Unsetting old execution context: %s", PHPDBG_G(exec));
- efree(PHPDBG_G(exec));
+ free(PHPDBG_G(exec));
PHPDBG_G(exec) = NULL;
PHPDBG_G(exec_len) = 0L;
}
@@ -436,7 +436,7 @@ PHPDBG_COMMAND(exec) /* {{{ */
VCWD_CHDIR_FILE(res);
- *SG(request_info).argv = PHPDBG_G(exec);
+ *SG(request_info).argv = estrndup(PHPDBG_G(exec), PHPDBG_G(exec_len));
php_build_argv(NULL, &PG(http_globals)[TRACK_VARS_SERVER]);
phpdbg_notice("exec", "type=\"set\" context=\"%s\"", "Set execution context: %s", PHPDBG_G(exec));
@@ -534,9 +534,9 @@ int phpdbg_compile_stdin(zend_string *code) {
}
if (PHPDBG_G(exec)) {
- efree(PHPDBG_G(exec));
+ free(PHPDBG_G(exec));
}
- PHPDBG_G(exec) = estrdup("Standard input code");
+ PHPDBG_G(exec) = strdup("Standard input code");
PHPDBG_G(exec_len) = sizeof("Standard input code") - 1;
{ /* remove leading ?> from source */
int i;