From 97ab3f9e9a4e140e72616e1613a1725c3c9fba51 Mon Sep 17 00:00:00 2001 From: Nathan Date: Mon, 26 Aug 2019 08:35:43 -0400 Subject: [PATCH] Add a descriptive comment to codecopy_ --- mythril/laser/ethereum/instructions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mythril/laser/ethereum/instructions.py b/mythril/laser/ethereum/instructions.py index d010be0a..d79a7ca5 100644 --- a/mythril/laser/ethereum/instructions.py +++ b/mythril/laser/ethereum/instructions.py @@ -1051,7 +1051,10 @@ class Instruction: if ( isinstance(global_state.current_transaction, ContractCreationTransaction) and code_offset >= len(global_state.environment.code.bytecode) // 2 - ): + ):ce + # Treat creation code after the expected disassembly as calldata. + # This is a slightly hacky way to ensure that symbolic constructor + # arguments work correctly. offset = code_offset - len(global_state.environment.code.bytecode) // 2 return self._calldata_copy_helper( global_state, global_state.mstate, memory_offset, offset, size