Skip to content

Commit

Permalink
Revert "alloc dynamically for rDNS names"
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
wilhuff committed Feb 6, 2024
1 parent 171e8ae commit 5863f2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parsley.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3499,15 +3499,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

0 comments on commit 5863f2c

Please sign in to comment.