summaryrefslogtreecommitdiff
path: root/TSRM/tsrm_win32.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-08-19 18:43:46 +0000
committerPierre Joye <pajoye@php.net>2009-08-19 18:43:46 +0000
commitb64e5e6bd0c3929648a5220381f65f7187260666 (patch)
tree8f0df30c75bcc7d104024ccc76eabbba3405e25b /TSRM/tsrm_win32.c
parente90f0eda2d87fe2bce8f96adfd103c13a925023a (diff)
downloadphp-git-b64e5e6bd0c3929648a5220381f65f7187260666.tar.gz
- fixed #43327, wrong return value from mail(), if sendmail_path is wrong
Diffstat (limited to 'TSRM/tsrm_win32.c')
-rw-r--r--TSRM/tsrm_win32.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c
index 187f5e652e..a22f31a922 100644
--- a/TSRM/tsrm_win32.c
+++ b/TSRM/tsrm_win32.c
@@ -311,7 +311,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();
@@ -348,12 +347,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);