diff options
author | Andi Gutmans <andi@php.net> | 2001-07-07 20:00:35 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2001-07-07 20:00:35 +0000 |
commit | 6f3f47eaa945c86a4eae1c8c19f88053df359eb0 (patch) | |
tree | 4b6d796b98a466d990caf311f564f9b1a80a5050 /TSRM | |
parent | 7efccca429975a8580bebc4d7803912886f2e239 (diff) | |
download | php-git-6f3f47eaa945c86a4eae1c8c19f88053df359eb0.tar.gz |
- Fix off by one error in allocating command line (by Shane)
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 47c91d381e..daa861bf03 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -135,7 +135,7 @@ TSRM_API FILE* popen(const char *command, const char *type) startup.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); } - cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+4); + 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, NULL, NULL, &startup, &process)) { return NULL; @@ -184,4 +184,4 @@ TSRM_API int pclose(FILE* stream) return termstat; } -#endif
\ No newline at end of file +#endif |