about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2015-02-05 19:48:08 -0800
committerStan Shebs <stanshebs@google.com>2015-02-05 19:48:08 -0800
commitd37331c9efa8e1719f8fb6a6a62bfa45901519e0 (patch)
tree7db13dcbddf564cc8050069c9572764592e22b82
parentdaee27e94cfb86c069343e91bc986529cbd51bf1 (diff)
downloadglibc-d37331c9efa8e1719f8fb6a6a62bfa45901519e0.tar.gz
glibc-d37331c9efa8e1719f8fb6a6a62bfa45901519e0.tar.xz
glibc-d37331c9efa8e1719f8fb6a6a62bfa45901519e0.zip
Backport fix for getnetbyname Tested:
-rw-r--r--README.google4
-rw-r--r--resolv/nss_dns/dns-network.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/README.google b/README.google
index 3589cc8616..d9d6760aef 100644
--- a/README.google
+++ b/README.google
@@ -420,3 +420,7 @@ dlfcn/dlopen.c
 
 resolv/res_libc.c
   For b/18473393, port r9102, r11566, and r14311 from eglibc sources.
+
+resolv/nss_dns/dns-resolve.c
+  For b/18752432, backport infinite loop fix in getnetbyname (PR17630)
+  https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11e3417af6e354f1942c68a271ae51e892b2814d
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 8e80a6010e..60c94f38a4 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
 
 	case BYNAME:
 	  {
-	    char **ap = result->n_aliases++;
-	    while (*ap != NULL)
+	    char **ap;
+	    for (ap = result->n_aliases; *ap != NULL; ++ap)
 	      {
 		/* Check each alias name for being of the forms:
 		   4.3.2.1.in-addr.arpa		= net 1.2.3.4