Skip to content

Commit 4798947

Browse files
committed
Throw MagicMismatch on fat Mach-O files for now
1 parent 97df536 commit 4798947

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/MachO/MachOHandle.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ function readmeta(io::IO,::Type{MachOHandle})
2323
header_type = macho_header_type(magic)
2424
endianness = macho_endianness(magic)
2525

26+
# If it's fat, just throw MagicMismatch
27+
if header_type <: MachOFatHeader
28+
throw(MagicMismatch("FAT header"))
29+
end
30+
2631
# Unpack the header
2732
header = unpack(io, header_type, endianness)
2833
return MachOHandle(io, start, header, path(io))

0 commit comments

Comments
 (0)