diff options
| author | Alexander Taylor <alex@vector35.com> | 2025-04-10 13:27:34 -0400 |
|---|---|---|
| committer | Alexander Taylor <alex@vector35.com> | 2025-04-14 18:35:29 -0400 |
| commit | 941b8b63c02184b4708d85391c5348b8d8913628 (patch) | |
| tree | f2b2dca7fda020595f6b314bbcd516d7247b977c /view/macho/fatmachoview.cpp | |
| parent | c3f286e6ab09fb7945d84fa7d213905d328bb4e5 (diff) | |
Avoid MH_FILESET in Mach-O view during magic check.
Diffstat (limited to 'view/macho/fatmachoview.cpp')
| -rw-r--r-- | view/macho/fatmachoview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/view/macho/fatmachoview.cpp b/view/macho/fatmachoview.cpp index de9b755b..83499fb6 100644 --- a/view/macho/fatmachoview.cpp +++ b/view/macho/fatmachoview.cpp @@ -210,8 +210,8 @@ bool FatMachoViewType::IsTypeValidForData(BinaryView* data) if (!ExtractFatArchForCPU(data, arch, m_cputype, m_cpusubtype)) return false; - // MachoView::IsMacho only considers the magic header, so we can load only that - DataBuffer buffer = data->ReadBuffer(arch.offset, 4); + // MachoView::IsMacho needs to inspect the full header + DataBuffer buffer = data->ReadBuffer(arch.offset, sizeof(mach_header)); Ref<BinaryData> newData = new BinaryData(data->GetFile(), std::move(buffer)); Ref<BinaryViewType> attemptedViewType = FatViewTypeForData(newData); |
