mirror of https://github.com/status-im/nim-eth.git
Fix possible AssertionError in typedranges on rlp reading invalid list
This commit is contained in:
parent
4b154e56c7
commit
4cf3262902
|
@ -364,6 +364,9 @@ proc readImpl(rlp: var Rlp, T: type[object|tuple],
|
|||
mixin enumerateRlpFields, read
|
||||
|
||||
if wrappedInList:
|
||||
if not rlp.isList:
|
||||
raise newException(RlpTypeMismatch,
|
||||
"List expected, but the source RLP is not a list.")
|
||||
var
|
||||
payloadOffset = rlp.payloadOffset()
|
||||
payloadEnd = rlp.position + payloadOffset + rlp.payloadBytesCount()
|
||||
|
|
Loading…
Reference in New Issue