From d8bf5021c78bf04fb71b2e47968d6387b588bab4 Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Wed, 25 Sep 2019 16:52:22 +0100 Subject: [PATCH] Add the return condition (#1216) --- mythril/analysis/modules/delegatecall.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mythril/analysis/modules/delegatecall.py b/mythril/analysis/modules/delegatecall.py index aa0cae6a..e9229468 100644 --- a/mythril/analysis/modules/delegatecall.py +++ b/mythril/analysis/modules/delegatecall.py @@ -56,6 +56,10 @@ class DelegateCallModule(DetectionModule): constraints = [ to == ATTACKER_ADDRESS, UGT(gas, symbol_factory.BitVecVal(2300, 256)), + state.new_bitvec( + "retval_{}".format(state.get_current_instruction()["address"]), 256 + ) + == 1, ] for tx in state.world_state.transaction_sequence: