]> granicus.if.org Git - php/commitdiff
Backout fix for spaces in both the program name and argument name, this will be fixed...
authorScott MacVicar <scottmac@php.net>
Fri, 6 Jun 2008 23:05:37 +0000 (23:05 +0000)
committerScott MacVicar <scottmac@php.net>
Fri, 6 Jun 2008 23:05:37 +0000 (23:05 +0000)
TSRM/tsrm_win32.c

index 57f9fbc9fd0a8da6109f8c08509f3b39f3f7f534..86a0e4ea8105cdaa5aa04744ef3283ecd669766a 100644 (file)
@@ -217,8 +217,8 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
                startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
        }
 
-       cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2);
-       sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command);
+       cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
+       sprintf(cmd, "%s /c %s", TWG(comspec), command);
        if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) {
                return NULL;
        }