aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-10-10 20:25:38 -0500
committerJack Nagel2014-10-10 20:25:38 -0500
commit578cb637594d32b86322be29205329d700ad75ca (patch)
treecf6b742e21a6538e2a33193de3a829507d5b0c2c /Library
parent4f8a3e2113c2e7b88600ff6371f9f70579c55509 (diff)
downloadhomebrew-578cb637594d32b86322be29205329d700ad75ca.tar.bz2
Handle read(n) returning nil
Fixes #33090.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/mach.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/mach.rb b/Library/Homebrew/mach.rb
index de38d296b..ff3b76d2d 100644
--- a/Library/Homebrew/mach.rb
+++ b/Library/Homebrew/mach.rb
@@ -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|