wordpad: Avoid an out-of-bounds array access in registry_set_filelist.
This commit is contained in:
parent
d28c40da3b
commit
c7482ad1c1
|
@ -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],
|
||||
|
|
Loading…
Reference in New Issue