Skip to content

Commit 882bbaf

Browse files
wilhuffwez
authored andcommitted
Revert "alloc dynamically for rDNS names"
This reverts commit d86a31a. This change does not seem to be correct. See discussion: #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`.
1 parent 171e8ae commit 882bbaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parsley.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3499,15 +3499,15 @@ AtomicInfo *APar_reverseDNS_atom_Init(const char *rDNS_atom_name,
34993499
APar_atom_Binary_Put(
35003500
&parsedAtoms[rDNS_mean_atom], rDNS_domain, domain_len, 0);
35013501

3502-
uint32_t name_len = strlen(rDNS_atom_name);
35033502
short rDNS_name_atom = APar_InterjectNewAtom("name",
35043503
CHILD_ATOM,
35053504
VERSIONED_ATOM,
3506-
name_len,
3505+
12,
35073506
AtomFlags_Data_Binary,
35083507
0,
35093508
ilst_atom->AtomicLevel + 2,
35103509
rDNS_mean_atom);
3510+
uint32_t name_len = strlen(rDNS_atom_name);
35113511
parsedAtoms[rDNS_name_atom].ReverseDNSname =
35123512
(char *)calloc(1, sizeof(char) * 101);
35133513
memcpy(

0 commit comments

Comments
 (0)