Skip to content

Commit

Permalink
Merge pull request #93 from astewart-bah/master
Browse files Browse the repository at this point in the history
Fix logic error in _write_to_mem_with_gadget()
  • Loading branch information
Kyle-Kyle authored Apr 6, 2024
2 parents 5d44d31 + 12d1539 commit 8009e66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions angrop/chain_builder/mem_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def _write_to_mem_with_gadget(self, gadget, addr_val, data, use_partial_controll
raise RopException("memory write fails")
# the next pc must come from the stack
if len(state.regs.pc.variables) != 1:
return False
raise RopException("must have only one pc variable")
if not set(state.regs.pc.variables).pop().startswith("symbolic_stack"):
return False
raise RopException("the next pc not from the stack")
return chain

0 comments on commit 8009e66

Please sign in to comment.