Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions wdns/unpack_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,7 @@ wdns_unpack_name(const uint8_t *p, const uint8_t *eop, const uint8_t *src,

if (cptr > eop)
return (wdns_res_invalid_compression_pointer);

if (cptr == src - 1 && (*(src - 1) == 0)) {
/* if a compression pointer points to exactly one octet
* before itself, then the only valid domain name pointee
* is the zero-octet root label. */
src = cptr;
} else if (cptr > src - 2) {
if (cptr > src - 2) {
return (wdns_res_invalid_compression_pointer);
} else {
src = cptr;
Expand Down