Fix a bug causing an infinite loop in getaddrinfo (closes: #3344)
authorNicolas Thill <nico@openwrt.org>
Sun, 11 May 2008 10:19:12 +0000 (10:19 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 11 May 2008 10:19:12 +0000 (10:19 +0000)
SVN-Revision: 11106

toolchain/uClibc/patches/009-fix_getaddrinfo_infinite_loop.patch [new file with mode: 0644]

diff --git a/toolchain/uClibc/patches/009-fix_getaddrinfo_infinite_loop.patch b/toolchain/uClibc/patches/009-fix_getaddrinfo_infinite_loop.patch
new file mode 100644 (file)
index 0000000..27830b3
--- /dev/null
@@ -0,0 +1,14 @@
+diff -ruN uClibc-0.9.29.orig/libc/inet/getaddrinfo.c uClibc-0.9.29/libc/inet/getaddrinfo.c
+--- uClibc-0.9.29.orig/libc/inet/getaddrinfo.c 2006-01-22 20:35:08.000000000 +0100
++++ uClibc-0.9.29/libc/inet/getaddrinfo.c      2008-05-11 03:33:18.000000000 +0200
+@@ -858,7 +858,10 @@
+       if (hints->ai_family == g->family || hints->ai_family == AF_UNSPEC)
+       {
+           if ((hints->ai_flags & AI_ADDRCONFIG) && !addrconfig(g->family))
++          {
++              g++;
+               continue;
++          }
+           j++;
+           if (pg == NULL || pg->gaih != g->gaih)
+           {