Commit 126884f0 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Stop PrivateExtractIcons from crashing given an invalid icon index.

parent f4c813f7
......@@ -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;
......
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