From 8ba51495fc0b321cbaf6a516a43117c5cc310b50 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 17 Oct 2009 16:00:44 +0100 Subject: [PATCH] winmm: Handle NULL szFileName in mmioOpen16 (Coverity). --- dlls/winmm/mmio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index 14fb4e3d83d..b774003abb8 100644 --- a/dlls/winmm/mmio.c +++ b/dlls/winmm/mmio.c @@ -598,6 +598,8 @@ static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags, if (dwOpenFlags & (MMIO_PARSE|MMIO_EXIST)) { char buffer[MAX_PATH]; + if (!szFileName) + return (HMMIO)FALSE; if (GetFullPathNameA(szFileName, sizeof(buffer), buffer, NULL) >= sizeof(buffer)) return (HMMIO)FALSE; if ((dwOpenFlags & MMIO_EXIST) && (GetFileAttributesA(buffer) == INVALID_FILE_ATTRIBUTES))