Skip to content

Commit

Permalink
fix infitite looping in resolver
Browse files Browse the repository at this point in the history
...this time for real ...hopefully :)

fixup of 870f217

Signed-off-by: Steffen Jaeckel <[email protected]>
  • Loading branch information
sjaeckel committed Aug 5, 2022
1 parent e9bd063 commit 004a5bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static unsigned message_name_get(const unsigned char *buf,
return 0;
pointer = (label_len & 0x3f) << 8 | buf[i++];
/* Prevent infinite looping */
if (pointer == buf_offset)
if (pointer >= buf_offset)
return 0;
if (name != NULL && name_len >= name_max && name_max > 0) {
/* We have filled the name buffer. Don't pass it recursively. */
Expand Down

0 comments on commit 004a5bf

Please sign in to comment.