summaryrefslogtreecommitdiff
path: root/libc/inet/getaddrinfo.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-09 00:16:11 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-09 00:16:11 +0000
commitc40b05b4c4226b2c4323a9ba5b096377931682ef (patch)
treea94cfc05d1f4d350cd17a8773e566d11fc275e73 /libc/inet/getaddrinfo.c
parent73723d710b6f1868a20f8eb36383795524f516ad (diff)
getaddrinfo: runp->ifa_addr indeed can be NULL, don't dereference it
ifaddrs.c: cosmetics, no code changes
Diffstat (limited to 'libc/inet/getaddrinfo.c')
-rw-r--r--libc/inet/getaddrinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c
index b1aae1281..25a5b8022 100644
--- a/libc/inet/getaddrinfo.c
+++ b/libc/inet/getaddrinfo.c
@@ -189,6 +189,8 @@ static unsigned __check_pf(void)
}
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;