summaryrefslogtreecommitdiff
path: root/toolchain/uClibc/patches-0.9.29/009-fix_getaddrinfo_infinite_loop.patch
blob: 5d702a3aceaa4b660cdba112e437472f14598f45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/libc/inet/getaddrinfo.c
+++ b/libc/inet/getaddrinfo.c
@@ -858,7 +858,10 @@ getaddrinfo (const char *name, const cha
 	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)
 	    {