patches/uClibc/0.9.30/150-getaddrinfo-segfault-ipv6-and-ipv4.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Thu Dec 27 12:45:22 2012 +0100 (2012-12-27)
changeset 3152 b286c7993be5
permissions -rw-r--r--
scripts/addToolsVersion: properly handle .in vs. .in.2

While most components have their version in the .in file, some
have it in the .in.2 (eg. elf2flt).

Currently, to handle this case, we indiscriminately munge both files,
but this is wrong: in the elf2flt case, if we add a binutils version,
we do not want it to be added to elf2flt, and conversely.

So, for each tool, we need to explicitly know what file to munge.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
yann@1217
     1
From: Tomoyoshi ASANO <asa@lineo.co.jp>
yann@1217
     2
Message ID: <20081208073522.0AEF.22C34B8C@lineo.co.jp>
yann@1217
     3
yann@1217
     4
Hello,
yann@1217
     5
yann@1217
     6
I have SEGV at busybox's telnet with uClibc-0.9.30.
yann@1217
     7
It seem the current uClibc-trunk has the same problem.
yann@1217
     8
yann@1217
     9
Thanks,
yann@1217
    10
-- Tom
yann@1217
    11
yann@1217
    12
diff -ru uClibc-0.9.30.orig/libc/inet/getaddrinfo.c uClibc-0.9.30/libc/inet/getaddrinfo.c
yann@1217
    13
--- uClibc-0.9.30.orig/libc/inet/getaddrinfo.c	2008-10-28 17:25:10.000000000 +0100
yann@1217
    14
+++ uClibc-0.9.30/libc/inet/getaddrinfo.c	2009-02-26 14:20:06.000000000 +0100
yann@1217
    15
@@ -186,7 +186,7 @@
yann@1217
    16
 			return seen;
yann@1217
    17
 		}
yann@1217
    18
 
yann@1217
    19
-		for (runp = ifa; runp != NULL; runp = runp->ifa_next)
yann@1217
    20
+		for (runp = ifa; runp != NULL; runp = runp->ifa_next) {
yann@1217
    21
 #if defined __UCLIBC_HAS_IPV4__
yann@1217
    22
 			if (runp->ifa_addr->sa_family == PF_INET)
yann@1217
    23
 				seen |= SEEN_IPV4;
yann@1217
    24
@@ -195,7 +195,7 @@
yann@1217
    25
 			if (runp->ifa_addr->sa_family == PF_INET6)
yann@1217
    26
 				seen |= SEEN_IPV6;
yann@1217
    27
 #endif /* __UCLIBC_HAS_IPV6__ */
yann@1217
    28
-
yann@1217
    29
+                }
yann@1217
    30
 		freeifaddrs(ifa);
yann@1217
    31
 	}
yann@1217
    32
 #else