(hosts_keys): Pass INADDRSZ as size rather than IN6ADDRSZ to AF_INET gethostbyaddr.
authorUlrich Drepper <drepper@redhat.com>
Sat, 8 Oct 2005 17:28:41 +0000 (17:28 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 8 Oct 2005 17:28:41 +0000 (17:28 +0000)
nss/getent.c

index 02bba39..489420e 100644 (file)
@@ -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);