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

fix: DisconnectReason::decode should return error on zero length list #7284

Merged
merged 2 commits into from Mar 21, 2024

Conversation

0xqd
Copy link
Contributor

@0xqd 0xqd commented Mar 21, 2024

Closes #7279

Currently the DisconnectReason::decode returns DisconnectReason::DisconnectRequested for list input with zero payload_length which should return an error instead.

Closes paradigmxyz#7279

Currently the DisconnectReason::decode returns DisconnectReason::DisconnectRequested for list input with zero payload_length which shouldn't happen.
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

just one nit, otherwise this looks good, thanks!

crates/net/eth-wire/src/disconnect.rs Outdated Show resolved Hide resolved
@shekhirin shekhirin added C-bug An unexpected or incorrect behavior A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general labels Mar 21, 2024
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

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

lgtm!

@Rjected Rjected added this pull request to the merge queue Mar 21, 2024
Merged via the queue into paradigmxyz:main with commit ea5535c Mar 21, 2024
27 checks passed
@0xqd 0xqd deleted the patch-2 branch March 21, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devp2p Related to the Ethereum P2P protocol A-networking Related to networking in general C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure DisconnectReason RLP header payload length is correct
3 participants