From 52d37429c65a5935de97d6ff29dcc2c5904dd18f Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 19 Aug 2009 18:43:46 +0000 Subject: [PATCH] - fixed #43327, wrong return value from mail(), if sendmail_path is wrong --- TSRM/tsrm_win32.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index f49a711b2e..291b9dddc3 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -312,7 +312,6 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, SECURITY_ATTRIBUTES security; HANDLE in, out; DWORD dwCreateFlags = 0; - char *cmd; process_pair *proc; TSRMLS_FETCH(); @@ -350,12 +349,9 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, dwCreateFlags |= CREATE_NO_WINDOW; } - cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c ")+2); - sprintf(cmd, "%s /c \"%s\"", TWG(comspec), command); - if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process)) { + if (!CreateProcess(NULL, command, &security, &security, security.bInheritHandle, dwCreateFlags, env, cwd, &startup, &process)) { return NULL; } - free(cmd); CloseHandle(process.hThread); proc = process_get(NULL TSRMLS_CC); -- 2.50.1