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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/parsley.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2388,10 +2388,8 @@ short APar_InterjectNewAtom(const char *atom_name,

new_atom->AtomicData = (char *)calloc(
1,
sizeof(char) * (atom_length > 16
? atom_length
: 16)); // puts a hard limit on the length of
// strings (the spec doesn't)
sizeof(char) * MAXDATA_PAYLOAD + 1); // puts a hard limit on the length of
// strings (the spec doesn't)

new_atom->ID32_TagInfo = NULL;

Expand Down Expand Up @@ -3499,15 +3497,15 @@ AtomicInfo *APar_reverseDNS_atom_Init(const char *rDNS_atom_name,
APar_atom_Binary_Put(
&parsedAtoms[rDNS_mean_atom], rDNS_domain, domain_len, 0);

uint32_t name_len = strlen(rDNS_atom_name);
short rDNS_name_atom = APar_InterjectNewAtom("name",
CHILD_ATOM,
VERSIONED_ATOM,
name_len,
12,
AtomFlags_Data_Binary,
0,
ilst_atom->AtomicLevel + 2,
rDNS_mean_atom);
uint32_t name_len = strlen(rDNS_atom_name);
parsedAtoms[rDNS_name_atom].ReverseDNSname =
(char *)calloc(1, sizeof(char) * 101);
memcpy(
Expand Down