blob: d2de3c6298c580926cbb355be5502b357c175e58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Fix for netlink code that causes crashes with e.g. ppp or tun
interfaces.
Basically a back port of c40b05b4c4226b2c4323a9ba5b096377931682ef:
Author: Denis Vlasenko <vda.linux@googlemail.com>
Date: Tue Dec 9 00:16:11 2008 +0000
getaddrinfo: runp->ifa_addr indeed can be NULL, don't dereference it
Index: uClibc-0.9.30.1/libc/inet/getaddrinfo.c
===================================================================
--- uClibc-0.9.30.1.orig/libc/inet/getaddrinfo.c 2009-07-29 08:54:52.000000000 +0300
+++ uClibc-0.9.30.1/libc/inet/getaddrinfo.c 2009-07-29 08:55:16.000000000 +0300
@@ -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;
|