Bruno Jesus : winmm: Handle invalid threshold values in joySetThreshold.
Module: wine Branch: master Commit: 125b0f74c5e57350f29062f02452270a8d893b1b URL: http://source.winehq.org/git/wine.git/?a=commit;h=125b0f74c5e57350f29062f024... Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Thu Dec 11 02:54:01 2014 -0200 winmm: Handle invalid threshold values in joySetThreshold. --- 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 d3dcfa5..6ac67f4 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;
participants (1)
-
Alexandre Julliard