1 2010-11-24 Andreas Schwab <schwab@redhat.com>
3 * resolv/nss_dns/dns-host.c (getanswer_r): Don't handle ttl == 0
5 (gaih_getanswer_slice): Likewise.
7 Index: glibc-2.12-2-gc4ccff1/resolv/nss_dns/dns-host.c
8 ===================================================================
9 --- glibc-2.12-2-gc4ccff1.orig/resolv/nss_dns/dns-host.c
10 +++ glibc-2.12-2-gc4ccff1/resolv/nss_dns/dns-host.c
11 @@ -599,7 +599,6 @@ getanswer_r (const querybuf *answer, int
12 int (*name_ok) (const char *);
13 u_char packtmp[NS_MAXCDNAME];
16 uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
18 if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
19 @@ -733,7 +732,7 @@ getanswer_r (const querybuf *answer, int
20 cp += INT16SZ; /* type */
21 class = __ns_get16 (cp);
22 cp += INT16SZ; /* class */
23 - ttl = __ns_get32 (cp);
24 + int32_t ttl = __ns_get32 (cp);
25 cp += INT32SZ; /* TTL */
27 cp += INT16SZ; /* len */
28 @@ -907,7 +906,7 @@ getanswer_r (const querybuf *answer, int
32 - if (ttlp != NULL && ttl != 0)
37 @@ -1163,7 +1162,7 @@ gaih_getanswer_slice (const querybuf *an
41 - if (ttl != 0 && ttlp != NULL)
45 (*pat)->name = canon ?: h_name;