Win32: Make sure we zero out PROCESS_INFORMATION.
authorGerald Combs <gerald@wireshark.org>
Thu, 28 Apr 2016 19:39:56 +0000 (12:39 -0700)
committerGerald Combs <gerald@wireshark.org>
Fri, 29 Apr 2016 00:38:40 +0000 (00:38 +0000)
Make sure we zero our PROCESS_INFORMATION struct before passing it to
CreateProcess.

Change-Id: Ib42320965bb7b2d37a9fc106d78ace02153e48d2
Reviewed-on: https://code.wireshark.org/review/15154
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
capchild/capture_sync.c

index d1aceee5ebf6cb4156dd19a08cb111369d25f41c..f15110f995bfa76bafc587374a64dab080647389 100644 (file)
@@ -645,9 +645,10 @@ sync_pipe_start(capture_options *capture_opts, capture_session *cap_session, inf
         return FALSE;
     }
 
-    /* init STARTUPINFO */
+    /* init STARTUPINFO & PROCESS_INFORMATION */
     memset(&si, 0, sizeof(si));
     si.cb           = sizeof(si);
+    memset(&pi, 0, sizeof(pi));
 #ifdef DEBUG_CHILD
     si.dwFlags = STARTF_USESHOWWINDOW;
     si.wShowWindow  = SW_SHOW;
@@ -916,9 +917,10 @@ sync_pipe_open_command(char** argv, int *data_read_fd,
         return -1;
     }
 
-    /* init STARTUPINFO */
+    /* init STARTUPINFO & PROCESS_INFORMATION */
     memset(&si, 0, sizeof(si));
     si.cb           = sizeof(si);
+    memset(&pi, 0, sizeof(pi));
 #ifdef DEBUG_CHILD
     si.dwFlags = STARTF_USESHOWWINDOW;
     si.wShowWindow  = SW_SHOW;