summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-03-30 12:17:39 +0000
committerFelipe Pena <felipe@php.net>2008-03-30 12:17:39 +0000
commit3e663ebfef31a5bfb9d2f80fba3a8b81930a4283 (patch)
tree22b75540e9e28d55f3cfa098c5eecc1541fc4d0d /ext
parentfd6f77d569962033261a6d6e6bb799b1a4cd09e2 (diff)
downloadphp-git-3e663ebfef31a5bfb9d2f80fba3a8b81930a4283.tar.gz
Fixed bug #44564 (escapeshellarg removes UTF-8 multi-byte characters)
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 2c38a1a34a..2906f87d1d 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -279,6 +279,8 @@ char *php_escape_shell_cmd(char *str) {
if (mb_len < 0) {
continue;
} else if (mb_len > 1) {
+ memcpy(cmd + y, str + x, mb_len);
+ y += mb_len;
x += mb_len - 1;
continue;
}
@@ -361,6 +363,8 @@ char *php_escape_shell_arg(char *str) {
if (mb_len < 0) {
continue;
} else if (mb_len > 1) {
+ memcpy(cmd + y, str + x, mb_len);
+ y += mb_len;
x += mb_len - 1;
continue;
}