get_nscd_addresses: Fix subscript typos [BZ #29605]
Fix the subscript on air->family, which was accidentally set to COUNT when it should have remained as I. Resolves: BZ #29605 Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
parent
7de3f0a96c
commit
c9226c03da
|
@ -540,11 +540,11 @@ get_nscd_addresses (const char *name, const struct addrinfo *req,
|
||||||
at[count].addr[2] = htonl (0xffff);
|
at[count].addr[2] = htonl (0xffff);
|
||||||
}
|
}
|
||||||
else if (req->ai_family == AF_UNSPEC
|
else if (req->ai_family == AF_UNSPEC
|
||||||
|| air->family[count] == req->ai_family)
|
|| air->family[i] == req->ai_family)
|
||||||
{
|
{
|
||||||
at[count].family = air->family[count];
|
at[count].family = air->family[i];
|
||||||
memcpy (at[count].addr, addrs, size);
|
memcpy (at[count].addr, addrs, size);
|
||||||
if (air->family[count] == AF_INET6)
|
if (air->family[i] == AF_INET6)
|
||||||
res->got_ipv6 = true;
|
res->got_ipv6 = true;
|
||||||
}
|
}
|
||||||
at[count].next = at + count + 1;
|
at[count].next = at + count + 1;
|
||||||
|
|
Loading…
Reference in a new issue