Skip to content

Commit

Permalink
Fix fails in glibc-2.28
Browse files Browse the repository at this point in the history
  • Loading branch information
david942j committed Mar 7, 2019
1 parent 2becd55 commit 1810bd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/one_gadget/fetchers/amd64.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def jmp_case_candidates
next nil if jmp_at.nil?

cand = cand[0..jmp_at]
next if cand.any? { |c| c.include?(call_str) }

jmp_addr = cand.last.scan(/jmp\s+([\da-f]+)\s/)[0][0].to_i(16)
dump = `#{objdump_cmd(start: jmp_addr, stop: jmp_addr + 100)}|egrep '[0-9a-f]+:'`
remain = dump.lines.map(&:strip).reject(&:empty?)
Expand Down

0 comments on commit 1810bd7

Please sign in to comment.