mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-25 07:21:05 +00:00
832e00da4f
Fix getaddrinfo when both IPv4 and IPv6 are enabled. /trunk/patches/uClibc/0.9.30/150-getaddrinfo-segfault-ipv6-and-ipv4.patch | 32 32 0 0 ++++++++++ 1 file changed, 32 insertions(+)
33 lines
920 B
Diff
33 lines
920 B
Diff
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
|