mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
Fix ICO_ExtractIconExW causing explorer to crash when trying
to display icon for bad EXE PE header. See CORE-15879 Co-authored-by: Thomas Faber <thomas.faber@reactos.org>
This commit is contained in:
parent
781fb4a55e
commit
60851914a8
|
@ -616,6 +616,15 @@ static UINT ICO_ExtractIconExW(
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
/* Check for boundary limit (and overflow) */
|
||||||
|
if (((ULONG_PTR)(rootresdir + 1) < (ULONG_PTR)rootresdir) ||
|
||||||
|
((ULONG_PTR)(rootresdir + 1) > (ULONG_PTR)peimage + fsizel))
|
||||||
|
{
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* search for the group icon directory */
|
/* search for the group icon directory */
|
||||||
if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICON), rootresdir)))
|
if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICON), rootresdir)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue