From 9e600168fb5537f97438c8b99c7d3e989491e226 Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Wed, 17 Oct 2018 15:08:39 +0200 Subject: [PATCH] Also check for empty return data --- mythril/laser/ethereum/transaction/transaction_models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mythril/laser/ethereum/transaction/transaction_models.py b/mythril/laser/ethereum/transaction/transaction_models.py index 35826bcd..4060c4e1 100644 --- a/mythril/laser/ethereum/transaction/transaction_models.py +++ b/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)