Bruno Jesus : winmm: Handle NULL parameter in joyGetPos/joyGetPosEx.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Dec 11 15:22:15 CST 2014


Module: wine
Branch: master
Commit: 45f46bd3596e7d31df7fa7f4ea5e28485a30e8f1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=45f46bd3596e7d31df7fa7f4ea5e28485a30e8f1

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Thu Dec 11 02:53:26 2014 -0200

winmm: Handle NULL parameter in joyGetPos/joyGetPosEx.

---

 dlls/winmm/joystick.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c
index ddd556d..d4b500a 100644
--- a/dlls/winmm/joystick.c
+++ b/dlls/winmm/joystick.c
@@ -219,6 +219,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 (!JOY_LoadDriver(wID))	return MMSYSERR_NODRIVER;
 
@@ -244,6 +245,7 @@ MMRESULT WINAPI joyGetPos(UINT wID, LPJOYINFO lpInfo)
 {
     TRACE("(%d, %p);\n", wID, lpInfo);
 
+    if (!lpInfo) return MMSYSERR_INVALPARAM;
     if (wID >= MAXJOYSTICK)	return JOYERR_PARMS;
     if (!JOY_LoadDriver(wID))	return MMSYSERR_NODRIVER;
 




More information about the wine-cvs mailing list