Use bytecode as CODESIZE

pull/304/head
Nikhil Parasaram 7 years ago
parent 3ba2550354
commit 9d01a6107a
  1. 1
      mythril/disassembler/disassembly.py
  2. 2
      mythril/laser/ethereum/svm.py

@ -11,6 +11,7 @@ class Disassembly:
self.xrefs = []
self.func_to_addr = {}
self.addr_to_func = {}
self.bytecode = code
try:
mythril_dir = os.environ['MYTHRIL_DIR']

@ -635,7 +635,7 @@ class LaserEVM:
state.stack.append(environment.sender)
elif op == 'CODESIZE':
state.stack.append(len(disassembly.instruction_list))
state.stack.append(len(disassembly.bytecode) // 2)
if op == 'SHA3':
op0, op1 = state.stack.pop(), state.stack.pop()

Loading…
Cancel
Save