Skip to content

Commit 8009e66

Browse files
authored
Merge pull request #93 from astewart-bah/master
Fix logic error in _write_to_mem_with_gadget()
2 parents 5d44d31 + 12d1539 commit 8009e66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

angrop/chain_builder/mem_writer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def _write_to_mem_with_gadget(self, gadget, addr_val, data, use_partial_controll
263263
raise RopException("memory write fails")
264264
# the next pc must come from the stack
265265
if len(state.regs.pc.variables) != 1:
266-
return False
266+
raise RopException("must have only one pc variable")
267267
if not set(state.regs.pc.variables).pop().startswith("symbolic_stack"):
268-
return False
268+
raise RopException("the next pc not from the stack")
269269
return chain

0 commit comments

Comments
 (0)