Stop PrivateExtractIcons from crashing given an invalid icon index.
This commit is contained in:
parent
f4c813f74b
commit
126884f030
|
@ -543,6 +543,12 @@ static UINT ICO_ExtractIconExW(
|
|||
{
|
||||
const IMAGE_RESOURCE_DIRECTORY *xresdir;
|
||||
xresdir = find_entry_by_id(iconresdir, LOWORD(pIconId[i]), rootresdir);
|
||||
if( !xresdir )
|
||||
{
|
||||
WARN("icon entry %d not found\n", LOWORD(pIconId[i]));
|
||||
RetPtr[i]=0;
|
||||
continue;
|
||||
}
|
||||
xresdir = find_entry_default(xresdir, rootresdir);
|
||||
idataent = (PIMAGE_RESOURCE_DATA_ENTRY)xresdir;
|
||||
idata = NULL;
|
||||
|
|
Loading…
Reference in New Issue