Merge pull request #588 from JoranHonig/bugfix/emptyreturn_data

Also check for empty return data
pull/593/head
JoranHonig 6 years ago committed by GitHub
commit a1cecf1e58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      mythril/laser/ethereum/transaction/transaction_models.py

@ -129,7 +129,7 @@ class ContractCreationTransaction:
def end(self, global_state, return_data=None, revert=False):
if not all([isinstance(element, int) for element in return_data]):
if not all([isinstance(element, int) for element in return_data]) or len(return_data) == 0:
self.return_data = None
raise TransactionEndSignal(global_state)
@ -137,6 +137,7 @@ class ContractCreationTransaction:
global_state.environment.active_account.code = Disassembly(contract_code)
self.return_data = global_state.environment.active_account.address
assert global_state.environment.active_account.code.instruction_list != []
raise TransactionEndSignal(global_state, revert=revert)

Loading…
Cancel
Save