summaryrefslogtreecommitdiff
path: root/ext/standard/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/exec.c')
-rw-r--r--ext/standard/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index eda62caf1c..671f6ffd14 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -263,7 +263,7 @@ char *php_escape_shell_cmd(char *str) {
char *p = NULL;
l = strlen(str);
- cmd = emalloc(2 * l + 1);
+ cmd = safe_emalloc(2, l, 1);
for (x = 0, y = 0; x < l; x++) {
switch (str[x]) {
@@ -320,7 +320,7 @@ char *php_escape_shell_arg(char *str) {
y = 0;
l = strlen(str);
- cmd = emalloc(4 * l + 3); /* worst case */
+ cmd = safe_emalloc(4, l, 3); /* worst case */
cmd[y++] = '\'';