Module: wine Branch: master Commit: 63a74c7dd483ab12a03ba7972c15a14e74a0c0b0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=63a74c7dd483ab12a03ba7972c...
Author: Rob Shearman rob@codeweavers.com Date: Thu Dec 27 10:01:09 2007 +0000
rpcss: Zero the memory of several variables before writing them to the pipe to silence Valgrind warnings.
---
programs/rpcss/np_server.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/programs/rpcss/np_server.c b/programs/rpcss/np_server.c index 1708947..d26cf32 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;