Add a descriptive comment to codecopy_

bug/constructor-arguments
Nathan 5 years ago committed by GitHub
parent d390b4a6a4
commit 97ab3f9e9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      mythril/laser/ethereum/instructions.py

@ -1051,7 +1051,10 @@ class Instruction:
if ( if (
isinstance(global_state.current_transaction, ContractCreationTransaction) isinstance(global_state.current_transaction, ContractCreationTransaction)
and code_offset >= len(global_state.environment.code.bytecode) // 2 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 offset = code_offset - len(global_state.environment.code.bytecode) // 2
return self._calldata_copy_helper( return self._calldata_copy_helper(
global_state, global_state.mstate, memory_offset, offset, size global_state, global_state.mstate, memory_offset, offset, size

Loading…
Cancel
Save