]> git.ipfire.org Git - thirdparty/glibc.git/commit
nss_dns: Check address length before creating addrinfo result [BZ #19831]
authorFlorian Weimer <fweimer@redhat.com>
Wed, 27 Apr 2016 14:39:12 +0000 (16:39 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 9 May 2016 09:35:01 +0000 (11:35 +0200)
commit730244f49ad8f46308f5513e58365eed370423cb
tree6df7ec2a98445dff5dd5c80f485c054782c36c03
parent1e51b4d367fcee5fc7767265e2b1469457ee64e1
nss_dns: Check address length before creating addrinfo result [BZ #19831]

Previously, we allocated room in the result space before the check,
leaving uninitialized data there in case the check failed.

This also consolidates the behavior between single (A or AAAA) and
dual (A and AAAA in parallel) queries.  Single queries checked
the record length against the QTYPE, not the RRTYPE.

(cherry picked from commit 5e0c421cc07e2d06945b863ed3bb92395472705d)
ChangeLog
resolv/nss_dns/dns-host.c