mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
ext/standard/exec.c: combine conditions, update docs
While `php_escape_shell_cmd()` did indeed `emalloc` a string that needed to be
freed by the caller in the original implementation that was put in GitHub
(see commit 257de2bade
) a few months ago the
return type was changed to use `zend_string`, see #14353.
Closes GH-16313
This commit is contained in:
parent
e150b0b3a1
commit
6c9db6085a
@ -118,11 +118,7 @@ PHPAPI int php_exec(int type, const char *cmd, zval *array, zval *return_value)
|
||||
php_stream *stream;
|
||||
size_t buflen, bufl = 0;
|
||||
#if PHP_SIGCHILD
|
||||
void (*sig_handler)() = NULL;
|
||||
#endif
|
||||
|
||||
#if PHP_SIGCHILD
|
||||
sig_handler = signal (SIGCHLD, SIG_DFL);
|
||||
void (*sig_handler)() = signal(SIGCHLD, SIG_DFL);
|
||||
#endif
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
@ -272,8 +268,7 @@ PHP_FUNCTION(passthru)
|
||||
Escape all chars that could possibly be used to
|
||||
break out of a shell command
|
||||
|
||||
This function emalloc's a string and returns the pointer.
|
||||
Remember to efree it when done with it.
|
||||
This function returns an owned zend_string, remember to release it when done.
|
||||
|
||||
*NOT* safe for binary strings
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user