+2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort.
+ [RT #18044]
+
2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery
(clear DF) for UDP responses and requests.
/* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.9 2006/12/07 04:00:08 marka Exp $";
+static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.10 2008/09/24 06:04:13 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports. */
}
if (m == 0)
continue;
- if (hap < &pvt->h_addr_ptrs[MAXADDRS-1])
+ if (hap < &pvt->h_addr_ptrs[MAXADDRS])
hap++;
*hap = NULL;
bp += m;
*ap = NULL;
*hap = NULL;
- if (pvt->res->nsort && haveanswer > 1 && qtype == T_A)
+ if (pvt->res->nsort && hap != pvt->h_addr_ptrs &&
+ qtype == T_A)
addrsort(pvt->res, pvt->h_addr_ptrs,
- haveanswer);
+ hap - pvt->h_addr_ptrs);
if (pvt->host.h_name == NULL) {
n = strlen(qname) + 1; /* for the \0 */
if (n > (ep - bp) || n >= MAXHOSTNAMELEN)
/* Avoid overflows. */
if (bp + addrlen > &pvt->hostbuf[sizeof(pvt->hostbuf) - 1])
return(-1);
- if (hap >= &pvt->h_addr_ptrs[MAXADDRS-1])
+ if (hap >= &pvt->h_addr_ptrs[MAXADDRS])
return(0); /* fail, but not treat it as an error. */
/* Suppress duplicates. */