Open divagant-martian opened 1 year ago
rlp
seems to accept concatenations of valid rlp data as valid rlp data, I think this is a bug.
Take for example
[193, 75]
this is a one element list with payload 75
[193, 75, 248]
this as a whole is not valid rlp
data. It's also not valid as concatenation of rlp
data. This is not rejected
[193, 75, 75]
as a whole is also not valid rlp
data.
However:
[193, 75, 75]
still produces item_count()
= 2
, and an iter
that gives 75
and 75
Unsure if this a bug or an api shortcoming.
When decoding bytes that have extra data, I would expect one of:
example: