aboutsummaryrefslogtreecommitdiff
path: root/resolv/nss_dns
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-12-31 20:22:09 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-12-31 20:27:44 +0100
commitfc82b0a2dfe7dbd35671c10510a8da1043d746a5 (patch)
tree86b8ef6421ca34fa1907121e078e008c580029ea /resolv/nss_dns
parent3c589b1a8a4401e258ba23a03fcbcc79b82393ab (diff)
downloadglibc-fc82b0a2dfe7dbd35671c10510a8da1043d746a5.zip
glibc-fc82b0a2dfe7dbd35671c10510a8da1043d746a5.tar.gz
glibc-fc82b0a2dfe7dbd35671c10510a8da1043d746a5.tar.bz2
CVE-2015-5180: resolv: Fix crash with internal QTYPE [BZ #18784]
Also rename T_UNSPEC because an upcoming public header file update will use that name.
Diffstat (limited to 'resolv/nss_dns')
-rw-r--r--resolv/nss_dns/dns-host.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index 901e037..d597faa 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -324,7 +324,7 @@ _nss_dns_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
int olderr = errno;
enum nss_status status;
- int n = __libc_res_nsearch (&_res, name, C_IN, T_UNSPEC,
+ int n = __libc_res_nsearch (&_res, name, C_IN, T_QUERY_A_AND_AAAA,
host_buffer.buf->buf, 2048, &host_buffer.ptr,
&ans2p, &nans2p, &resplen2, &ans2p_malloced);
if (n >= 0)