MachO: Accept file types other than MH_EXECUTE (#67)

This commit is contained in:
Katy Coe
2020-09-12 13:20:23 +02:00
parent 4261b5b2d1
commit 98bd12e76d
2 changed files with 5 additions and 4 deletions

View File

@@ -102,8 +102,8 @@ namespace Il2CppInspector
header = ReadObject<MachOHeader<TWord>>(0);
// Must be executable file
if ((MachO)header.FileType != MachO.MH_EXECUTE)
// Must be of a known file type
if ((MachO)header.FileType < MachO.MH_MIN_FILETYPE || (MachO)header.FileType > MachO.MH_MAX_FILETYPE)
return false;
// Process load commands