Commit 8ba51495 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

winmm: Handle NULL szFileName in mmioOpen16 (Coverity).

parent 1ae60177
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment