Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement Deserialize for Block #3

Merged
merged 2 commits into from
Sep 1, 2024
Merged

Conversation

iFrostizz
Copy link
Owner

No description provided.

rlp/src/de.rs Outdated Show resolved Hide resolved
rlp/src/lib.rs Outdated Show resolved Hide resolved
Comment on lines +177 to +179
if len_bytes.starts_with(&[0]) {
return Err(RlpError::TrailingBytes);
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caught by fuzzing, run it on CI

Comment on lines +29 to +34
let mut rlp = unpack_rlp(bytes)?;
let t = T::deserialize(&mut rlp)?;
if !rlp.is_empty() {
return Err(RlpError::TrailingBytes);
}
Ok(t)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caught by fuzzing, may want to remove some safeguard somewhere else.

@iFrostizz iFrostizz merged commit 68ad176 into master Sep 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant