mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +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
1 changed files with 9 additions and 0 deletions
|
@ -616,6 +616,15 @@ static UINT ICO_ExtractIconExW(
|
|||
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 */
|
||||
if (!(icongroupresdir = find_entry_by_id(rootresdir, LOWORD(RT_GROUP_ICON), rootresdir)))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue