summaryrefslogtreecommitdiff
path: root/patches/uClibc/0.9.30/150-getaddrinfo-segfault-ipv6-and-ipv4.patch
blob: 40f2928d0aeaee43330307905de0fce78a22c7b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Tomoyoshi ASANO <asa@lineo.co.jp>
Message ID: <20081208073522.0AEF.22C34B8C@lineo.co.jp>

Hello,

I have SEGV at busybox's telnet with uClibc-0.9.30.
It seem the current uClibc-trunk has the same problem.

Thanks,
-- Tom

diff -ru uClibc-0.9.30.orig/libc/inet/getaddrinfo.c uClibc-0.9.30/libc/inet/getaddrinfo.c
--- uClibc-0.9.30.orig/libc/inet/getaddrinfo.c	2008-10-28 17:25:10.000000000 +0100
+++ uClibc-0.9.30/libc/inet/getaddrinfo.c	2009-02-26 14:20:06.000000000 +0100
@@ -186,7 +186,7 @@
 			return seen;
 		}
 
-		for (runp = ifa; runp != NULL; runp = runp->ifa_next)
+		for (runp = ifa; runp != NULL; runp = runp->ifa_next) {
 #if defined __UCLIBC_HAS_IPV4__
 			if (runp->ifa_addr->sa_family == PF_INET)
 				seen |= SEEN_IPV4;
@@ -195,7 +195,7 @@
 			if (runp->ifa_addr->sa_family == PF_INET6)
 				seen |= SEEN_IPV6;
 #endif /* __UCLIBC_HAS_IPV6__ */
-
+                }
 		freeifaddrs(ifa);
 	}
 #else