diff --git a/angrop/chain_builder/mem_changer.py b/angrop/chain_builder/mem_changer.py index 1d55f54..de2bc8b 100644 --- a/angrop/chain_builder/mem_changer.py +++ b/angrop/chain_builder/mem_changer.py @@ -115,13 +115,13 @@ def add_to_mem(self, addr, value, data_size=None): l.debug("Now building the mem add chain") # try to build the chain - try: - for g in gadgets: + for g in gadgets: + try: chain = self._add_mem_with_gadget(g, addr, data_size, difference=value) self.verify(chain, addr, value, data_size) return chain - except RopException: - pass + except RopException: + pass raise RopException("Fail to perform add_to_mem!")