[5/6] winmm: Handle invalid threshold values in joySetThreshold
Bruno Jesus
00cpxxx at gmail.com
Wed Dec 10 22:54:01 CST 2014
-------------- next part --------------
---
dlls/winmm/joystick.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c
index 82fcc73..75879c7 100644
--- a/dlls/winmm/joystick.c
+++ b/dlls/winmm/joystick.c
@@ -325,7 +325,7 @@ MMRESULT WINAPI joySetThreshold(UINT wID, UINT wThreshold)
{
TRACE("(%04X, %d);\n", wID, wThreshold);
- if (wID >= MAXJOYSTICK) return MMSYSERR_INVALPARAM;
+ if (wID >= MAXJOYSTICK || wThreshold > 65535) return MMSYSERR_INVALPARAM;
JOY_Sticks[wID].threshold = wThreshold;
--
1.8.3.2
More information about the wine-patches
mailing list