From 135f929a39e10ca1b373bcbd5a1400b7aecd7545 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Thu, 11 Dec 2014 02:53:48 -0200 Subject: [PATCH] winmm: The dwSize paramater of JOYINFOEX must be set correctly. --- 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 9c06fc26fd0..f4870febab9 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -220,7 +220,7 @@ MMRESULT WINAPI DECLSPEC_HOTPATCH joyGetPosEx(UINT wID, LPJOYINFOEX lpInfo) TRACE("(%d, %p);\n", wID, lpInfo); if (!lpInfo) return MMSYSERR_INVALPARAM; - if (wID >= MAXJOYSTICK) return JOYERR_PARMS; + if (wID >= MAXJOYSTICK || lpInfo->dwSize < sizeof(JOYINFOEX)) return JOYERR_PARMS; if (!JOY_LoadDriver(wID)) return MMSYSERR_NODRIVER; lpInfo->dwXpos = 0;