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 broken short rDNS names #71

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

wilhuff
Copy link
Contributor

@wilhuff wilhuff commented Feb 6, 2024

This reverts commit d86a31a, restoring the initial allocation of the name atom to 12 bytes, which must be the case, given the way AtomicLength is treated. See #66 (comment) for why.

Additionally, allocate the AtomicData buffer to use a MAXDATA_PAYLOAD-sized buffer. This accommodates longer names that were causing problems in #44. Those crashes were happening because of heap corruption due to writing past the end of the 16-byte buffer.

This reverts commit d86a31a.

This change does not seem to be correct. See discussion:

wez#66 (comment)

The `12` was related to a fixed-size header and not related to the
length of the variable-length rdns name. That length is encoded in the
data part of the atom, in the call to `APar_atom_Binary_Put`.
@wilhuff wilhuff reopened this Feb 7, 2024
@wilhuff wilhuff changed the title Revert "alloc dynamically for rDNS names" Fix broken short rDNS names Feb 7, 2024
@wez wez merged commit 9224de3 into wez:master Jun 8, 2024
@wez
Copy link
Owner

wez commented Jun 8, 2024

Thanks!

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