cvs: php-src(PHP_5_2) / NEWS /ext/standard exec.c
| From: | Ilia Alshanetsky | Date: | Mon, 17 Mar 2008 23:02:27 +0000 |
| Subject: | cvs: php-src(PHP_5_2) / NEWS /ext/standard exec.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-49164@lists.php.net to get a copy of this message | ||
iliaa Mon Mar 17 23:02:27 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard exec.c
/php-src NEWS
Log:
MFB: Properly address incomplete multibyte chars inside escapeshellcmd()
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.4&r2=1.113.2.3.2.5&diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.113.2.3.2.4 php-src/ext/standard/exec.c:1.113.2.3.2.5
--- php-src/ext/standard/exec.c:1.113.2.3.2.4 Mon Dec 31 07:20:12 2007
+++ php-src/ext/standard/exec.c Mon Mar 17 23:02:26 2008
@@ -16,7 +16,7 @@
| Ilia Alshanetsky <iliaa@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: exec.c,v 1.113.2.3.2.4 2007/12/31 07:20:12 sebastian Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.5 2008/03/17 23:02:26 iliaa Exp $ */
#include <stdio.h>
#include "php.h"
@@ -270,6 +270,11 @@
cmd = safe_emalloc(2, l, 1);
for (x = 0, y = 0; x < l; x++) {
+ /* skip non-valid multibyte characters */
+ if (php_mblen(str + x, (l - x)) < 0) {
+ continue;
+ }
+
switch (str[x]) {
case '"':
case '\'':
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1118&r2=1.2027.2.547.2.1119&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1118 php-src/NEWS:1.2027.2.547.2.1119
--- php-src/NEWS:1.2027.2.547.2.1118 Sat Mar 15 10:46:48 2008
+++ php-src/NEWS Mon Mar 17 23:02:26 2008
@@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Mar 2008 , PHP 5.2.6
+- Properly address incomplete multibyte chars inside escapeshellcmd() (Ilia,
+ Stefan Esser)
- Fixed bug #44440 (st_blocks undefined under BeOS). (Felipe)
- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
- Fixed bug #44388 (Crash inside exif_read_data() on invalid images) (Ilia)