aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/ws_pipe.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-04-07 13:36:31 +0800
committerAnders Broman <a.broman58@gmail.com>2018-04-08 22:31:56 +0000
commitffe2f138ab62c48467645a953fb0617bf2f1b39b (patch)
tree6a1bbe3ea2fb01184a37753bb0a6a2a84e8c27af /wsutil/ws_pipe.c
parent510a1b1c0726240f10f65368f9a57d99573781ac (diff)
ws_pipe: Zero an array.
Make sure we zero-initialize pipeinsts, otherwise ConnectNamedPipe will have indeterminate behavior according to the MSDN documentation for the OVERLAPPED structure. Change-Id: I38d9680cf01b0a8f9e566a85a7a330f6c0aa9a48 Ping-Bug: 14532 Reviewed-on: https://code.wireshark.org/review/26784 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wsutil/ws_pipe.c')
-rw-r--r--wsutil/ws_pipe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wsutil/ws_pipe.c b/wsutil/ws_pipe.c
index a18897adfb..52e331c919 100644
--- a/wsutil/ws_pipe.c
+++ b/wsutil/ws_pipe.c
@@ -291,6 +291,8 @@ ws_pipe_wait_for_pipe(HANDLE * pipe_handles, int num_pipe_handles, HANDLE pid)
int num_waiting_to_connect = 0;
int num_handles = num_pipe_handles + 1; // PID handle is also added to list of handles.
+ SecureZeroMemory(pipeinsts, sizeof(pipeinsts));
+
if (num_pipe_handles == 0 || num_pipe_handles > 3)
{
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_DEBUG, "Invalid number of pipes given as argument.");