Skip to content

Commit

Permalink
(hosts_keys): Pass INADDRSZ as size rather than IN6ADDRSZ to AF_INET …
Browse files Browse the repository at this point in the history
…gethostbyaddr.
  • Loading branch information
Ulrich Drepper committed Oct 8, 2005
1 parent 869e83f commit 4f3d653
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nss/getent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4f3d653

Please sign in to comment.