diff options
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r-- | ext/standard/exec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 37bdefbb6b..28f01b338f 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -245,6 +245,8 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str) size_t estimate = (2 * l) + 1; zend_string *cmd; + TSRMLS_FETCH(); + cmd = zend_string_alloc(2 * l, 0); for (x = 0, y = 0; x < l; x++) { @@ -335,6 +337,8 @@ PHPAPI zend_string *php_escape_shell_arg(char *str) zend_string *cmd; size_t estimate = (4 * l) + 3; + TSRMLS_FETCH(); + cmd = zend_string_alloc(4 * l + 2, 0); /* worst case */ #ifdef PHP_WIN32 |