]>
Commit | Line | Data |
---|---|---|
30a4e827 MT |
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 | |
5 | int *h_errnop); | |
6 | libc_hidden_proto (__nss_hostname_digits_dots) | |
7 | ||
8 | +/* Maximum number of aliases we allow. */ | |
9 | +#define MAX_NR_ALIASES 48 | |
10 | +#define MAX_NR_ADDRS 48 | |
11 | + | |
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 | |
17 | @@ -89,10 +89,6 @@ | |
18 | ||
19 | #define RESOLVSORT | |
20 | ||
21 | -/* Maximum number of aliases we allow. */ | |
22 | -#define MAX_NR_ALIASES 48 | |
23 | -#define MAX_NR_ADDRS 48 | |
24 | - | |
25 | #if PACKETSZ > 65536 | |
26 | # define MAXPACKET PACKETSZ | |
27 | #else | |
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 | |
33 | IPv6 scope ids. */ | |
34 | if (req->ai_family == AF_INET) | |
35 | { | |
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); | |
40 | + | |
41 | assert (tmpbuf == NULL); | |
42 | tmpbuf = alloca_account (tmpbuflen, alloca_used); | |
43 | int rc; | |
44 | @@ -807,7 +810,7 @@ gaih_inet (const char *name, const struc | |
45 | old_res_options = _res.options; | |
46 | _res.options &= ~RES_USE_INET6; | |
47 | ||
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); | |
52 | if (!malloc_tmpbuf) | |
53 | Only in b/sysdeps/posix: getaddrinfo.c.orig | |
54 | Only in b/sysdeps/posix: getaddrinfo.c.rej |