Skip to content

Commit

Permalink
Use MAXDATA_PAYLOAD-sized buffers for AtomicData of rdns-related atoms
Browse files Browse the repository at this point in the history
Fixes #66. See extensive discussion there.
  • Loading branch information
wilhuff authored and wez committed Jun 8, 2024
1 parent 882bbaf commit 9224de3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 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

0 comments on commit 9224de3

Please sign in to comment.