Module: wine Branch: master Commit: 8ba51495fc0b321cbaf6a516a43117c5cc310b50 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8ba51495fc0b321cbaf6a516a4...
Author: Marcus Meissner marcus@jet.franken.de Date: Sat Oct 17 16:00:44 2009 +0100
winmm: Handle NULL szFileName in mmioOpen16 (Coverity).
---
dlls/winmm/mmio.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index 14fb4e3..b774003 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))