Merge pull request #5696 from iMichka/elf

elf.rb: avoid corrupted elf files
This commit is contained in:
Michka Popoff
2019-03-10 22:46:54 +01:00
committed by GitHub
+3 -1
View File
@@ -133,8 +133,10 @@ module ELFShim
soname = nil
needed = []
command = ["readelf", "-d", path.expand_path.to_s]
lines = Utils.safe_popen_read(*command).split("\n")
lines = Utils.popen_read(*command, err: :out).split("\n")
lines.each do |s|
next if s.start_with?("readelf: Warning: possibly corrupt ELF header")
filename = s[/\[(.*)\]/, 1]
next if filename.nil?