add missing checks
authorSylvain Petreolle <spetreolle@yahoo.fr>
Sat, 24 Oct 2009 15:13:30 +0000 (15:13 +0000)
committerSylvain Petreolle <spetreolle@yahoo.fr>
Sat, 24 Oct 2009 15:13:30 +0000 (15:13 +0000)
fixes winmm:mixer crash

svn path=/trunk/; revision=43717

reactos/dll/win32/winmm/winmm.c

index 325f0d5..c33fed1 100644 (file)
@@ -568,6 +568,9 @@ UINT WINAPI mixerGetLineInfoW(HMIXEROBJ hmix, LPMIXERLINEW lpmliW, DWORD fdwInfo
 
     TRACE("(%p, %p, %08lx)\n", hmix, lpmliW, fdwInfo);
 
+    if (lpmliW == NULL || lpmliW->cbStruct != sizeof(*lpmliW))
+       return MMSYSERR_INVALPARAM;
+       
     if ((uRet = MIXER_GetDev(hmix, fdwInfo, &lpwm)) != MMSYSERR_NOERROR)
        return uRet;