Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mythril/disassembler/disassembly.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#mythril/disassembler/disassembly.py
"""This module contains the class used to represent disassembly code."""

from typing import Dict, List, Tuple
Expand Down Expand Up @@ -106,7 +107,10 @@ def get_function_info(
offset = instruction_list[index + 2]["argument"]
if isinstance(offset, tuple):
offset = bytes(offset).hex()
entry_point = int(offset, 16)
if offset and len(offset) > 2:
entry_point = int(offset, 16)
else:
entry_point = 0
except (KeyError, IndexError):
return function_hash, None, None

Expand Down