winmm: Handle NULL szFileName in mmioOpen16 (Coverity).
This commit is contained in:
parent
1ae601772c
commit
8ba51495fc
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue