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
commita6df8785d8e51a1b4a916bfb1e555b253aa9cbfd (patch)
treedf589ef8f1b485a6dac998db43521d069351e7a3 /Library
parent01397d17f78e64a4869c1657819f5b1d061ee2ce (diff)
downloadbrew-a6df8785d8e51a1b4a916bfb1e555b253aa9cbfd.tar.bz2
Handle read(n) returning nil
Fixes Homebrew/homebrew#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|