Bruno Jesus : winmm: The dwSize paramater of JOYINFOEX must be set correctly.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Dec 11 15:22:15 CST 2014
Module: wine
Branch: master
Commit: 135f929a39e10ca1b373bcbd5a1400b7aecd7545
URL: http://source.winehq.org/git/wine.git/?a=commit;h=135f929a39e10ca1b373bcbd5a1400b7aecd7545
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Thu Dec 11 02:53:48 2014 -0200
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 9c06fc2..f4870fe 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;
More information about the wine-cvs
mailing list