patches/uClibc/0.9.30/150-getaddrinfo-segfault-ipv6-and-ipv4.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu Apr 26 19:55:59 2012 -0600 (2012-04-26)
changeset 2939 58974be61289
permissions -rw-r--r--
Allow multi-word "install" command.

Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c". When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

# this is the value returned by autoconf and stored in CT_install
$ ins="/usr/bin/install -c"

# if we call it with quotes, the command is not found
$ "${ins}"
bash: /usr/bin/install -c: No such file or directory

# removing the quotes lets it work as expected
$ ${ins}
/usr/bin/install: missing file operand
Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
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