resolv: Support an exactly sized buffer in ns_name_pack [BZ #21359]

System Internals / glibc - Florian Weimer [redhat.com] - 13 April 2017 05:56 EDT

This bug did not affect name resolution because those functions indirectly call ns_name_pack with a buffer which is always larger than the generated query packet, even in the case of the longest-possible domain name.

c803cb9 resolv: Support an exactly sized buffer in ns_name_pack [BZ #21359]
ChangeLog | 16 +++++
resolv/Makefile | 2 +
resolv/ns_name.c | 2 +-
resolv/tst-ns_name.c | 139 +++++++++++++++++++++++++++++++++++++++++-
resolv/tst-ns_name_compress.c | 75 +++++++++++++++++++++++
resolv/tst-resolv-basic.c | 30 ++++++++-
6 files changed, 260 insertions(+), 4 deletions(-)

Upstream: sourceware.org


  • Share