Skip to content

Commit 9224de3

Browse files
wilhuffwez
authored andcommitted
Use MAXDATA_PAYLOAD-sized buffers for AtomicData of rdns-related atoms
Fixes #66. See extensive discussion there.
1 parent 882bbaf commit 9224de3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/parsley.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -2388,10 +2388,8 @@ short APar_InterjectNewAtom(const char *atom_name,
23882388

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

23962394
new_atom->ID32_TagInfo = NULL;
23972395

0 commit comments

Comments
 (0)