diff options
| author | Jack Nagel | 2014-10-10 20:25:38 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-10-10 20:25:38 -0500 |
| commit | 578cb637594d32b86322be29205329d700ad75ca (patch) | |
| tree | cf6b742e21a6538e2a33193de3a829507d5b0c2c /Library | |
| parent | 4f8a3e2113c2e7b88600ff6371f9f70579c55509 (diff) | |
| download | homebrew-578cb637594d32b86322be29205329d700ad75ca.tar.bz2 | |
Handle read(n) returning nil
Fixes #33090.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/mach.rb | 2 |
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| |
