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: handle invalid input length when parsing a node id #3155

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

dignifiedquire
Copy link
Contributor

This avoids a panic when calling decode_mut with an invalid input length.

Closes #3153

This avoids a panic when calling `decode_mut` with an invalid input length.

Closes #3153
@dignifiedquire dignifiedquire requested a review from a team January 28, 2025 10:47
@dignifiedquire dignifiedquire added this to the v0.32.0 milestone Jan 28, 2025
@dignifiedquire dignifiedquire self-assigned this Jan 28, 2025
Copy link

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3155/docs/iroh/

Last updated: 2025-01-28T10:50:06Z

Copy link

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 2641915

Copy link
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

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

Very annoying that decode_mut panics... seems like a footgun.

@dignifiedquire dignifiedquire added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit a8d058f Jan 28, 2025
26 checks passed
@andrewdavidmackenzie
Copy link

Thanks!

@dignifiedquire dignifiedquire deleted the fix-node-id-panic branch January 28, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Node::from_str() can panic
3 participants