Skip to content
Snippets Groups Projects
Commit a6df8785 authored by Jack Nagel's avatar Jack Nagel
Browse files

Handle read(n) returning nil

Fixes Homebrew/homebrew#33090.
parent 01397d17
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ module MachO
offsets = []
mach_data = []
header = read(8).unpack("N2")
header = (read(8) || "").unpack("N2")
case header[0]
when 0xcafebabe # universal
header[1].times do |i|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment