From 4587a322df75853d82048eba61ac523b5a2482d0 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sat, 17 Oct 2009 10:08:51 +0200 Subject: [PATCH] winmm: Protect MCI_SYSINFO against null buffers. --- dlls/winmm/mci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 32204a0e6c2..b133ffcd8f1 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -1834,7 +1834,8 @@ static DWORD MCI_SysInfo(UINT uDevID, DWORD dwFlags, LPMCI_SYSINFO_PARMSW lpParm LPWINE_MCIDRIVER wmd; HKEY hKey; - if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK; + if (lpParms == NULL || lpParms->lpstrReturn == NULL) + return MCIERR_NULL_PARAMETER_BLOCK; TRACE("(%08x, %08X, %p[num=%d, wDevTyp=%u])\n", uDevID, dwFlags, lpParms, lpParms->dwNumber, lpParms->wDeviceType);