[GH-ISSUE #1366] Cleanup len() implementations #656

Open
opened 2026-03-15 23:43:16 +03:00 by kerem · 0 comments
Owner

Originally created by @bluejekyll on GitHub (Jan 23, 2021).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1366

Consider either add additional consts that represent things like Name::root or use mem::size_of to make the code more self-documenting.

One potential downside to using mem::size_of is that type sizes may accidentally be misaligned to the lengths expected in the DNS packets, which could potentially allow for accidental bugs to be inserted.

Originally created by @bluejekyll on GitHub (Jan 23, 2021). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/1366 Consider either add additional consts that represent things like `Name::root` or use `mem::size_of` to make the code more self-documenting. One potential downside to using `mem::size_of` is that type sizes may accidentally be misaligned to the lengths expected in the DNS packets, which could potentially allow for accidental bugs to be inserted.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#656
No description provided.