Commit b9407f75 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winmm: Always allocate at least MAX_PATH bytes in mmioOpenW().

parent 8a22d287
......@@ -734,6 +734,7 @@ HMMIO WINAPI mmioOpenW(LPWSTR szFileName, MMIOINFO* lpmmioinfo,
if (szFileName)
{
INT len = WideCharToMultiByte( CP_ACP, 0, szFileName, -1, NULL, 0, NULL, NULL );
if (len < MAX_PATH) len = MAX_PATH;
szFn = HeapAlloc( GetProcessHeap(), 0, len );
if (!szFn) return NULL;
WideCharToMultiByte( CP_ACP, 0, szFileName, -1, szFn, len, NULL, NULL );
......
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