From 4f3d6536ce873999c3019024d4045e3e0b34058a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 8 Oct 2005 17:28:41 +0000 Subject: [PATCH] (hosts_keys): Pass INADDRSZ as size rather than IN6ADDRSZ to AF_INET gethostbyaddr. --- nss/getent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nss/getent.c b/nss/getent.c index 02bba39..489420e 100644 --- a/nss/getent.c +++ b/nss/getent.c @@ -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); -- 2.7.4