Skip to content

Commit

Permalink
Fix issue with variable not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Jan 12, 2024
1 parent 9bacc49 commit 57cb3ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boa/vyper/decoder_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def decode_vyper_object(mem, typ):
]
if isinstance(typ, DArrayT):
length = int.from_bytes(mem[:32], "big")
if length > typ.length:
return [] # array is not initialized yet, memory can have garbage
n = typ.subtype.memory_bytes_required
ofst = 32
ret = []
Expand Down

0 comments on commit 57cb3ea

Please sign in to comment.