Commit de8a6cb3 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Don't read past end of table in PathFileExistsDefExtW.

parent 411fc5f1
...@@ -1078,7 +1078,7 @@ BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath,DWORD dwWhich) ...@@ -1078,7 +1078,7 @@ BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath,DWORD dwWhich)
int iLen = lstrlenW(lpszPath); int iLen = lstrlenW(lpszPath);
if (iLen > (MAX_PATH - 5)) if (iLen > (MAX_PATH - 5))
return FALSE; return FALSE;
while (dwWhich & 0x1 && iChoose < sizeof(pszExts)) while ( (dwWhich & 0x1) && pszExts[iChoose][0] )
{ {
lstrcpyW(lpszPath + iLen, pszExts[iChoose]); lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
if (PathFileExistsW(lpszPath)) if (PathFileExistsW(lpszPath))
......
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