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 wez#66. See extensive discussion there.
  • Loading branch information
wilhuff committed Feb 7, 2024
1 parent 5863f2c commit 7518866
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 7518866

Please sign in to comment.