summaryrefslogtreecommitdiffstats
path: root/src/subprocess-win32.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-12-02 04:39:39 (GMT)
committerEvan Martin <martine@danga.com>2011-12-02 04:39:39 (GMT)
commit25d9b1d92ac6208f90dbd17fe63f9f931b060799 (patch)
treea3ed47d86cdab83ced3456595c89505be798d0a0 /src/subprocess-win32.cc
parentf20e002eea38ef42d2a0de40a951d1ffb4eb2fa6 (diff)
downloadNinja-25d9b1d92ac6208f90dbd17fe63f9f931b060799.zip
Ninja-25d9b1d92ac6208f90dbd17fe63f9f931b060799.tar.gz
Ninja-25d9b1d92ac6208f90dbd17fe63f9f931b060799.tar.bz2
windows: clear process launch structs before using them
Diffstat (limited to 'src/subprocess-win32.cc')
-rw-r--r--src/subprocess-win32.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc
index f331337..79c4eba 100644
--- a/src/subprocess-win32.cc
+++ b/src/subprocess-win32.cc
@@ -91,6 +91,7 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) {
HANDLE child_pipe = SetupPipe(set->ioport_);
STARTUPINFOA startup_info;
+ memset(&startup_info, 0, sizeof(startup_info));
startup_info.cb = sizeof(STARTUPINFO);
startup_info.dwFlags = STARTF_USESTDHANDLES;
startup_info.hStdOutput = child_pipe;
@@ -100,6 +101,7 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) {
startup_info.hStdError = child_pipe;
PROCESS_INFORMATION process_info;
+ memset(&process_info, 0, sizeof(process_info));
// Do not prepend 'cmd /c' on Windows, this breaks command
// lines greater than 8,191 chars.