Skip to content

Commit

Permalink
URI parser needs to do printable ascii validation for string result
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 committed May 27, 2024
1 parent 75de16c commit 40fb125
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/ares_dns_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,11 @@ static ares_status_t ares_dns_parse_rr_uri(ares__buf_t *buf, ares_dns_rr_t *rr,
return status;
}

if (!ares__str_isprint(name, remaining_len)) {
ares_free(name);
return ARES_EBADRESP;
}

status = ares_dns_rr_set_str_own(rr, ARES_RR_URI_TARGET, name);
if (status != ARES_SUCCESS) {
ares_free(name);
Expand Down

0 comments on commit 40fb125

Please sign in to comment.