diff --git a/mythril/laser/ethereum/call.py b/mythril/laser/ethereum/call.py index 483894ce..aee2f30c 100644 --- a/mythril/laser/ethereum/call.py +++ b/mythril/laser/ethereum/call.py @@ -36,7 +36,7 @@ def get_call_parameters(global_state, dynamic_loader, with_value=False): callee_account = None call_data, call_data_type = get_call_data(global_state, meminstart, meminsz, False) - if int(callee_address, 16) >= 5: + if int(callee_address, 16) >= 5 or int(callee_address, 16) == 0: call_data, call_data_type = get_call_data(global_state, meminstart, meminsz) callee_account = get_callee_account(global_state, callee_address, dynamic_loader) diff --git a/mythril/laser/ethereum/instructions.py b/mythril/laser/ethereum/instructions.py index 64e87937..a7d9521f 100644 --- a/mythril/laser/ethereum/instructions.py +++ b/mythril/laser/ethereum/instructions.py @@ -917,7 +917,7 @@ class Instruction: value, environment.origin, calldata_type=call_data_type) - new_global_state = GlobalState(global_state.accounts, callee_environment, MachineState(gas)) + new_global_state = GlobalState(global_state.accounts, callee_environment, global_state.node, MachineState(gas)) new_global_state.mstate.depth = global_state.mstate.depth + 1 new_global_state.mstate.constraints = copy(global_state.mstate.constraints) return [global_state] @@ -944,7 +944,7 @@ class Instruction: environment.caller = environment.address environment.calldata = call_data - new_global_state = GlobalState(global_state.accounts, environment, MachineState(gas)) + new_global_state = GlobalState(global_state.accounts, environment, global_state.node, MachineState(gas)) new_global_state.mstate.depth = global_state.mstate.depth + 1 new_global_state.mstate.constraints = copy(global_state.mstate.constraints) @@ -972,7 +972,7 @@ class Instruction: environment.code = callee_account.code environment.calldata = call_data - new_global_state = GlobalState(global_state.accounts, environment, MachineState(gas)) + new_global_state = GlobalState(global_state.accounts, environment, global_state.node, MachineState(gas)) new_global_state.mstate.depth = global_state.mstate.depth + 1 new_global_state.mstate.constraints = copy(global_state.mstate.constraints)