winmm: Do not crash on NULL MCI Sysinfo command output buffer pointer.
This commit is contained in:
parent
4aa5f5bc10
commit
f177e61338
|
@ -1746,8 +1746,8 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm
|
||||||
LPWINE_MCIDRIVER wmd;
|
LPWINE_MCIDRIVER wmd;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
|
|
||||||
if (lpParms == NULL || lpParms->lpstrReturn == NULL)
|
if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
|
||||||
return MCIERR_NULL_PARAMETER_BLOCK;
|
if (lpParms->lpstrReturn == NULL) return MCIERR_PARAM_OVERFLOW;
|
||||||
|
|
||||||
TRACE("(%08x, %08X, %p[num=%d, wDevTyp=%u])\n",
|
TRACE("(%08x, %08X, %p[num=%d, wDevTyp=%u])\n",
|
||||||
uDevID, dwFlags, lpParms, lpParms->dwNumber, lpParms->wDeviceType);
|
uDevID, dwFlags, lpParms, lpParms->dwNumber, lpParms->wDeviceType);
|
||||||
|
|
|
@ -511,7 +511,7 @@ static void test_AutoOpenWAVE(HWND hwnd)
|
||||||
|
|
||||||
/* Do not crash on NULL buffer pointer */
|
/* Do not crash on NULL buffer pointer */
|
||||||
err = mciSendString("sysinfo waveaudio quantity open", NULL, 0, NULL);
|
err = mciSendString("sysinfo waveaudio quantity open", NULL, 0, NULL);
|
||||||
todo_wine ok(err==MCIERR_PARAM_OVERFLOW,"mci sysinfo without buffer returned error: %d\n", err);
|
ok(err==MCIERR_PARAM_OVERFLOW,"mci sysinfo without buffer returned error: %d\n", err);
|
||||||
|
|
||||||
err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
|
err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
|
||||||
ok(!err,"mci sysinfo waveaudio quantity open returned error: %d\n", err);
|
ok(!err,"mci sysinfo waveaudio quantity open returned error: %d\n", err);
|
||||||
|
|
Loading…
Reference in New Issue