From 63a74c7dd483ab12a03ba7972c15a14e74a0c0b0 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Thu, 27 Dec 2007 10:01:09 +0000 Subject: [PATCH] rpcss: Zero the memory of several variables before writing them to the pipe to silence Valgrind warnings. --- programs/rpcss/np_server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/rpcss/np_server.c b/programs/rpcss/np_server.c index 17089478b1f..d26cf32e927 100644 --- a/programs/rpcss/np_server.c +++ b/programs/rpcss/np_server.c @@ -110,6 +110,7 @@ static void RPCSS_ServerProcessRESOLVEEPMessage(PRPCSS_NP_MESSAGE pMsg, static void RPCSS_ServerProcessMessage(PRPCSS_NP_MESSAGE pMsg, PRPCSS_NP_REPLY pReply, char *vardata) { WINE_TRACE("\n"); + ZeroMemory(pReply, sizeof(*pReply)); switch (pMsg->message_type) { case RPCSS_NP_MESSAGE_TYPEID_RANMSG: RPCSS_ServerProcessRANMessage(pMsg, pReply); @@ -436,6 +437,7 @@ BOOL RPCSS_BecomePipeServer(void) */ if ((client_handle = RPCSS_NPConnect()) != INVALID_HANDLE_VALUE) { + ZeroMemory(&msg, sizeof(msg)); msg.message_type = RPCSS_NP_MESSAGE_TYPEID_RANMSG; msg.message.ranmsg.timeout = 1000; msg.vardata_payload_size = 0;