--- libc/inet/getaddrinfo.c.orig 2009-07-20 21:48:23 +0100 +++ libc/inet/getaddrinfo.c 2009-07-20 22:24:41 +0100 @@ -187,6 +187,8 @@ } for (runp = ifa; runp != NULL; runp = runp->ifa_next) { + if (runp->ifa_addr == NULL) + continue; #if defined __UCLIBC_HAS_IPV4__ if (runp->ifa_addr->sa_family == PF_INET) seen |= SEEN_IPV4; --- libc/inet/ifaddrs.c.orig 2009-07-20 22:25:13 +0100 +++ libc/inet/ifaddrs.c 2009-07-20 22:37:38 +0100 @@ -452,10 +452,7 @@ /* Allocate memory for all entries we have and initialize next pointer. */ - ifas = (struct ifaddrs_storage *) calloc (1, - (newlink + newaddr) - * sizeof (struct ifaddrs_storage) - + ifa_data_size); + ifas = calloc (1, (newlink + newaddr) * sizeof (ifas[0]) + ifa_data_size); if (ifas == NULL) { result = -1;