]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6'
authorChristoph M. Becker <cmb@php.net>
Tue, 23 Jun 2015 22:47:18 +0000 (00:47 +0200)
committerChristoph M. Becker <cmb@php.net>
Tue, 23 Jun 2015 22:47:18 +0000 (00:47 +0200)
* PHP-5.6:
  updated NEWS
  Fixed bug #69768 (escapeshell*() doesn't cater to !)
  bump API version to 6.8

1  2 
ext/standard/exec.c

index 60fd7ba1aa513a9ce2a285b27f398b4f61ff0c41,66d4537dab13c2829e0bd668a697923aec582cac..d13ac454ad41789dab57e918a9cf73366ae56c93
@@@ -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 '%':
 -                      cmd[y++] = ' ';
+               case '!':
 +                      cmd->val[y++] = ' ';
                        break;
  #else
                case '\'':