diff --git a/mythril/laser/ethereum/strategy/extensions/bounded_loops.py b/mythril/laser/ethereum/strategy/extensions/bounded_loops.py index 21843ddf..e3c11bdf 100644 --- a/mythril/laser/ethereum/strategy/extensions/bounded_loops.py +++ b/mythril/laser/ethereum/strategy/extensions/bounded_loops.py @@ -77,8 +77,8 @@ class BoundedLoopsStrategy(BasicSearchStrategy): key = cur_instr["address"] - for i in range(2, min(32, len(annotation.trace))): - key |= annotation.trace[-i] << (16 * i) + for i in range(1, min(128, len(annotation.trace))): + key |= annotation.trace[-i] << (i * 8) if key in annotation._reached_count: annotation._reached_count[key] += 1 diff --git a/tests/instructions/create2_test.py b/tests/instructions/create2_test.py index eb927f76..30cfc239 100644 --- a/tests/instructions/create2_test.py +++ b/tests/instructions/create2_test.py @@ -24,7 +24,7 @@ def generate_salted_address(code_str, salt, caller): salt = "0" * (64 - len(salt)) + salt contract_address = int( - get_code_hash("0xff" + addr + salt + get_code_hash(code_str)[2:])[26:], 16, + get_code_hash("0xff" + addr + salt + get_code_hash(code_str)[2:])[26:], 16 ) return contract_address