user32: Fix read of uninitialized data and a couple of typos in TrackMouseEvent. (Valgrind)
Alexander Scott-Johns
alexander.scott.johns at googlemail.com
Wed Feb 16 20:05:43 CST 2011
Fixes the obvious typo of ptme->dwHoverTime for ptme->dwFlags, and moves it
to the beginning of the condition, as dwHoverTime may be garbage if the flag
TME_HOVER is not set.
Found with Valgrind.
-------------- next part --------------
From b9c62de98e30a07788d4aba354823189d4986f0c Mon Sep 17 00:00:00 2001
From: Alexander Scott-Johns <alexander.scott.johns at googlemail.com>
Date: Wed, 16 Feb 2011 01:09:35 +0000
Subject: [PATCH] user32: Fix read of uninitialized data and a couple of typos in TrackMouseEvent. (Valgrind)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 4fd00ba..dac8044 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -1108,9 +1108,9 @@ TrackMouseEvent (TRACKMOUSEEVENT *ptme)
hover_time = ptme->dwHoverTime;
- /* if HOVER_DEFAULT was specified replace this with the systems current value.
+ /* if HOVER_DEFAULT was specified replace this with the system's current value.
* TME_LEAVE doesn't need to specify hover time so use default */
- if (hover_time == HOVER_DEFAULT || hover_time == 0 || !(ptme->dwHoverTime&TME_HOVER))
+ if (!(ptme->dwFlags & TME_HOVER) || hover_time == HOVER_DEFAULT || hover_time == 0)
SystemParametersInfoW(SPI_GETMOUSEHOVERTIME, 0, &hover_time, 0);
GetCursorPos(&pos);
--
1.7.0.4
More information about the wine-patches
mailing list