1 diff -rup a/nss/nsswitch.h b/nss/nsswitch.h
2 --- a/nss/nsswitch.h 2010-05-04 05:27:23.000000000 -0600
3 +++ b/nss/nsswitch.h 2012-07-05 11:28:15.316585117 -0600
4 @@ -182,4 +182,8 @@ extern int __nss_hostname_digits_dots (c
6 libc_hidden_proto (__nss_hostname_digits_dots)
8 +/* Maximum number of aliases we allow. */
9 +#define MAX_NR_ALIASES 48
10 +#define MAX_NR_ADDRS 48
12 #endif /* nsswitch.h */
13 Only in b/nss: nsswitch.h.orig
14 diff -rup a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
15 --- a/resolv/nss_dns/dns-host.c 2012-07-05 11:27:39.298760961 -0600
16 +++ b/resolv/nss_dns/dns-host.c 2012-07-05 11:28:15.317585112 -0600
21 -/* Maximum number of aliases we allow. */
22 -#define MAX_NR_ALIASES 48
23 -#define MAX_NR_ADDRS 48
26 # define MAXPACKET PACKETSZ
28 Only in b/resolv/nss_dns: dns-host.c.orig
29 diff -rup a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
30 --- a/sysdeps/posix/getaddrinfo.c 2012-07-05 11:27:39.284761028 -0600
31 +++ b/sysdeps/posix/getaddrinfo.c 2012-07-05 14:15:39.785546125 -0600
32 @@ -565,7 +565,10 @@ gaih_inet (const char *name, const struc
34 if (req->ai_family == AF_INET)
36 - size_t tmpbuflen = 512;
37 + /* Add room for struct host_data in resolv/nss_dns/dns-host.c */
38 + size_t tmpbuflen = 512 + (MAX_NR_ALIASES+MAX_NR_ADDRS+1)*sizeof(char*)
39 + + 16 * sizeof(char);
41 assert (tmpbuf == NULL);
42 tmpbuf = alloca_account (tmpbuflen, alloca_used);
44 @@ -807,7 +810,7 @@ gaih_inet (const char *name, const struc
45 old_res_options = _res.options;
46 _res.options &= ~RES_USE_INET6;
48 - size_t tmpbuflen = 1024;
49 + size_t tmpbuflen = 1024 + sizeof(struct gaih_addrtuple);
50 malloc_tmpbuf = !__libc_use_alloca (alloca_used + tmpbuflen);
51 assert (tmpbuf == NULL);
53 Only in b/sysdeps/posix: getaddrinfo.c.orig
54 Only in b/sysdeps/posix: getaddrinfo.c.rej