You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let invalid_rlp = [193,4,4];let rlp = rlp::Rlp::new(&invalid_rlp);let item_count = rlp.item_count().unwrap();// this should failassert_eq!(item_count, 2);// wrong. invalid rlp with a list of one element followed by extra// data that ends up being assumed as part of the listlet invalid_rlp = [195,2,247,247];let rlp = rlp::Rlp::new(&invalid_rlp);let item_count = rlp.item_count().unwrap();// should failassert_eq!(item_count, 1);// wrong. invalid rlp with a list of 3 bytes where only the first// one is valid rlplet invalid_rlp = [194,1];let rlp = rlp::Rlp::new(&invalid_rlp);let item_count = rlp.item_count().unwrap();// should failassert_eq!(item_count, 0);// wrong. list should occupy two bytes, occupies just one and it's// still accepted
The text was updated successfully, but these errors were encountered:
divagant-martian
changed the title
rlp: list length is not validated
rlp: list length and contents are not validated
Aug 9, 2023
Three examples that should be rejected
The text was updated successfully, but these errors were encountered: