cvs: php-src(PHP_5_2) /ext/standard exec.c /sapi/cli/tests bug44564.phpt
| From: | Felipe Pena | Date: | Sun, 30 Mar 2008 12:17:39 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/standard exec.c /sapi/cli/tests bug44564.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-49428@lists.php.net to get a copy of this message | ||
felipe Sun Mar 30 12:17:39 2008 UTC
Added files: (Branch: PHP_5_2)
/php-src/sapi/cli/tests bug44564.phpt
Modified files:
/php-src/ext/standard exec.c
Log:
Fixed bug #44564 (escapeshellarg removes UTF-8 multi-byte characters)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.8&r2=1.113.2.3.2.9&diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.113.2.3.2.8 php-src/ext/standard/exec.c:1.113.2.3.2.9
--- php-src/ext/standard/exec.c:1.113.2.3.2.8 Fri Mar 21 08:28:36 2008
+++ php-src/ext/standard/exec.c Sun Mar 30 12:17:39 2008
@@ -16,7 +16,7 @@
| Ilia Alshanetsky <iliaa@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: exec.c,v 1.113.2.3.2.8 2008/03/21 08:28:36 tony2001 Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.9 2008/03/30 12:17:39 felipe Exp $ */
#include <stdio.h>
#include "php.h"
@@ -279,6 +279,8 @@
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 @@
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;
}
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/bug44564.phpt?view=markup&rev=1.1
Index: php-src/sapi/cli/tests/bug44564.phpt
+++ php-src/sapi/cli/tests/bug44564.phpt