Skip to content

Commit ace8419

Browse files
authored
Merge pull request #84 from astewart-bah/master
Update mem_changer.py to address logic bug in add_to_mem.
2 parents f2e4616 + cfd6775 commit ace8419

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

angrop/chain_builder/mem_changer.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ def add_to_mem(self, addr, value, data_size=None):
115115
l.debug("Now building the mem add chain")
116116

117117
# try to build the chain
118-
try:
119-
for g in gadgets:
118+
for g in gadgets:
119+
try:
120120
chain = self._add_mem_with_gadget(g, addr, data_size, difference=value)
121121
self.verify(chain, addr, value, data_size)
122122
return chain
123-
except RopException:
124-
pass
123+
except RopException:
124+
pass
125125

126126
raise RopException("Fail to perform add_to_mem!")
127127

0 commit comments

Comments
 (0)