[PATCH] user32: initialize all of msg (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Jun 11 03:54:58 CDT 2011


Hi,

msg.hwnd was found not initialized, so just memset 0 the struct.
CID 5130

(It might not be used, but as it is copied, valgrind would also not be
 happy.)

Ciao, Marcus
---
 dlls/user32/tests/msg.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 62acf8a..a452a24 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -13054,6 +13054,7 @@ static LRESULT CALLBACK KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam
     {
         KBDLLHOOKSTRUCT *kdbhookstruct = (KBDLLHOOKSTRUCT*)lParam;
 
+	memset (&msg, 0, sizeof(msg));
         msg.message = wParam;
         msg.flags = kbd_hook|wparam|lparam;
         msg.wParam = kdbhookstruct->vkCode;
-- 
1.7.3.4




More information about the wine-patches mailing list