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 panic caused by a malformed input #1

Merged
merged 1 commit into from Mar 13, 2017

Conversation

Projects
None yet
2 participants
@neosilky
Copy link
Contributor

commented Mar 13, 2017

Converting from bytes to a Packet struct can fail and the unwrap will
cause a panic. All other lines use ?.into() - which fixes the issue.

An example of a malformed input would be:

0x23,0xc,0xfd,0x0,0x0,0x0,0x0,0x0,0x0,0x2a,0x0,0x0,0x0,0x0

Found using cargo-fuzz.

Fix panic caused by a malformed input
Converting from bytes to a Packet struct can fail and the unwrap will
cause a panic. All other lines use `?.into()` - which fixes the issue.

An example of a malformed input would be:

    `0x23,0xc,0xfd,0x0,0x0,0x0,0x0,0x0,0x0,0x2a,0x0,0x0,0x0,0x0`

Found using `cargo-fuzz.`
@JeffBelgum

This comment has been minimized.

Copy link
Owner

commented Mar 13, 2017

Thanks for the contribution! Nice catch.

@JeffBelgum JeffBelgum merged commit f4bdc41 into JeffBelgum:master Mar 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.