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

mplex header read incorrectly #110

Closed
arnetheduck opened this issue Mar 18, 2020 · 0 comments · Fixed by #116
Closed

mplex header read incorrectly #110

arnetheduck opened this issue Mar 18, 2020 · 0 comments · Fixed by #116

Comments

@arnetheduck
Copy link
Contributor

arnetheduck commented Mar 18, 2020

https://github.com/status-im/nim-libp2p/blob/b1a34f478efe6d1212cfccecaf4dd8bf89fc2b1f/libp2p/muxers/mplex/coder.nim#L52

reading the header calls readMplexVarint which raises when the varint is bigger than max message size, this however is not applicable for the header itself

https://github.com/status-im/nim-libp2p/blob/b1a34f478efe6d1212cfccecaf4dd8bf89fc2b1f/libp2p/muxers/mplex/coder.nim#L64

converting to MessageType is not safe - 7 is not a valid value for the enum

@dryajov dryajov mentioned this issue Mar 25, 2020
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 a pull request may close this issue.

1 participant