mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 22:30:07 +00:00
(hosts_keys): Pass INADDRSZ as size rather than IN6ADDRSZ to AF_INET gethostbyaddr.
This commit is contained in:
parent
869e83f2f9
commit
4f3d6536ce
@ -280,9 +280,9 @@ hosts_keys (int number, char *key[])
|
||||
char addr[IN6ADDRSZ];
|
||||
|
||||
if (inet_pton (AF_INET6, key[i], &addr) > 0)
|
||||
host = gethostbyaddr (addr, sizeof (addr), AF_INET6);
|
||||
host = gethostbyaddr (addr, IN6ADDRSZ, AF_INET6);
|
||||
else if (inet_pton (AF_INET, key[i], &addr) > 0)
|
||||
host = gethostbyaddr (addr, sizeof (addr), AF_INET);
|
||||
host = gethostbyaddr (addr, INADDRSZ, AF_INET);
|
||||
else if ((host = gethostbyname2 (key[i], AF_INET6)) == NULL)
|
||||
host = gethostbyname2 (key[i], AF_INET);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user