Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 5ee2bdb

Browse files
committed
Added array size check in ABI encoder
1 parent b5e8fa7 commit 5ee2bdb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ethereum/abi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ def enc(typ, arg):
705705
else:
706706
subtyp = base, sub, arrlist[:-1]
707707
o = b''
708+
assert len(arg) == arrlist[-1][0], "Incorrect array size"
708709
for x in arg:
709710
o += enc(subtyp, x)
710711
return o

0 commit comments

Comments
 (0)