From: Christoph M. Becker Date: Tue, 23 Jun 2015 22:47:18 +0000 (+0200) Subject: Merge branch 'PHP-5.6' X-Git-Tag: php-7.0.0beta1~12^2~49^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00adcbd3e965e6a219f7236ff4b365ef6ffa96f3;p=php Merge branch 'PHP-5.6' * PHP-5.6: updated NEWS Fixed bug #69768 (escapeshell*() doesn't cater to !) bump API version to 6.8 --- 00adcbd3e965e6a219f7236ff4b365ef6ffa96f3 diff --cc ext/standard/exec.c index 60fd7ba1aa,66d4537dab..d13ac454ad --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@@ -277,15 -275,16 +277,16 @@@ PHPAPI zend_string *php_escape_shell_cm } else if (p && *p == str[x]) { p = NULL; } else { - cmd[y++] = '\\'; + cmd->val[y++] = '\\'; } - cmd[y++] = str[x]; + cmd->val[y++] = str[x]; break; #else - /* % is Windows specific for environmental variables, ^%PATH% will - output PATH whil ^%PATH^% not. escapeshellcmd->val will escape all %. - /* % is Windows specific for enviromental variables, ^%PATH% will - output PATH while ^%PATH^% will not. escapeshellcmd will escape all % and !. ++ /* % is Windows specific for environmental variables, ^%PATH% will ++ output PATH while ^%PATH^% will not. escapeshellcmd->val will escape all % and !. */ case '%': + case '!': case '"': case '\'': #endif @@@ -369,7 -367,8 +370,8 @@@ PHPAPI zend_string *php_escape_shell_ar #ifdef PHP_WIN32 case '"': case '%': + case '!': - cmd[y++] = ' '; + cmd->val[y++] = ' '; break; #else case '\'':