Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 70

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.1 - fix name list check

From: Ian Kent <raven@themaw.net>

When translating a host name to an address (or list of addresses) the
check for the presence of additional addresses is incorrect. It needs
to use double indirection to get at the information.
--- autofs-5.0.1.orig/modules/replicated.c
+++ autofs-5.0.1/modules/replicated.c
@@ -1042,7 +1042,7 @@ static int add_host_addrs(struct host **
 	}
 
 	haddr = phe->h_addr_list;
-	if (++haddr)
+	if (++haddr && *haddr)
 		rr++;
 	for (haddr = phe->h_addr_list; *haddr; haddr++) {
 		struct in_addr tt;