Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not leak rr_name on failures inside ares_parse_a_reply

  • Loading branch information...
commit a1116723d40b402d0690061c1b23858c33953d79 1 parent 18b6d47
Jakub Hrozek authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  ares_parse_a_reply.c
View
3  ares_parse_a_reply.c
@@ -132,6 +132,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
aptr += len;
if (aptr + RRFIXEDSZ > abuf + alen)
{
+ free(rr_name);
status = ARES_EBADRESP;
break;
}
@@ -149,6 +150,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
{
if (aptr + sizeof(struct in_addr) > abuf + alen)
{
+ free(rr_name);
status = ARES_EBADRESP;
break;
}
@@ -159,6 +161,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
struct ares_addrttl * const at = &addrttls[naddrs];
if (aptr + sizeof(struct in_addr) > abuf + alen)
{
+ free(rr_name);
status = ARES_EBADRESP;
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.