Fix loader crash caused by missing zero padding of address strings

pull/1137/head
Bernhard Mueller 5 years ago
parent 613bb9ae58
commit 9319ff9ae9
  1. 2
      mythril/laser/ethereum/call.py
  2. 2
      mythril/laser/ethereum/state/account.py

@ -96,7 +96,7 @@ def get_callee_address(
# attempt to read the contract address from instance storage
try:
callee_address = dynamic_loader.read_storage(
hex(environment.active_account.address.value), index
"0x{:040X}".format(environment.active_account.address.value), index
)
# TODO: verify whether this happens or not
except:

@ -64,7 +64,7 @@ class Storage:
storage[item] = symbol_factory.BitVecVal(
int(
self.dynld.read_storage(
contract_address=hex(self.address.value),
contract_address="0x{:040X}".format(self.address.value),
index=int(item.value),
),
16,

Loading…
Cancel
Save