From: Scott MacVicar Date: Fri, 6 Jun 2008 23:05:37 +0000 (+0000) Subject: Backout fix for spaces in both the program name and argument name, this will be fixed... X-Git-Tag: php-5.2.7RC1~244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4fa4d53610dfdc15f9b1844b3f6846065139a5f;p=php Backout fix for spaces in both the program name and argument name, this will be fixed in PHP 5.3+ only --- diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 57f9fbc9fd..86a0e4ea81 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -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; }