Commit c7482ad1 authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

wordpad: Avoid an out-of-bounds array access in registry_set_filelist.

parent d28c40da
......@@ -318,7 +318,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
pFiles[0] = newFile;
}
for(i = 0; pFiles[i] && i < FILELIST_ENTRIES; i++)
for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
{
wsprintfW(buffer, var_file, i+1);
RegSetValueExW(hKey, (LPWSTR)&buffer, 0, REG_SZ, (const BYTE*)pFiles[i],
......
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