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: Ip{,v4,v6}Addr::decode #7

Merged
merged 3 commits into from
Sep 23, 2023
Merged

fix: Ip{,v4,v6}Addr::decode #7

merged 3 commits into from
Sep 23, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Sep 23, 2023

Motivation

Ip addr decoding used static_left_pad, which fails if the buffer starts with a zero. This is incorrect and it also should not pad lower lengths

Solution

Use <[u8; N]>::try_from(&[u8])

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes
  • Updated CHANGELOG.md

@DaniPopes DaniPopes merged commit 0051f5e into main Sep 23, 2023
@DaniPopes DaniPopes deleted the fix-ip-decode branch September 23, 2023 14:32
@Wollac Wollac mentioned this pull request Jun 28, 2024
4 tasks
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.

2 participants