From adcc572a29169e5b571ab06b1a5bf941985d8fe6 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 15 Jul 2021 08:28:50 +0200 Subject: resolv: Move ns_name_ntop to its own file and into libc Reformat to GNU style. Avoid out-of-bounds pointer arithmetic (e.g., use eom - dn < 2 instead of dn + 1 >= eom). Inline the labellen function and fold the compression pointer check into the length check (l >= 64). Assume ASCII encoding. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- include/arpa/nameser.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h index 7a8290e..f1a6965 100644 --- a/include/arpa/nameser.h +++ b/include/arpa/nameser.h @@ -65,7 +65,6 @@ libresolv_hidden_proto (ns_put32) libresolv_hidden_proto (ns_initparse) libresolv_hidden_proto (ns_skiprr) libresolv_hidden_proto (ns_parserr) -libresolv_hidden_proto (ns_name_ntop) libresolv_hidden_proto (ns_name_pton) libresolv_hidden_proto (ns_name_pack) libresolv_hidden_proto (ns_name_skip) @@ -79,5 +78,8 @@ libresolv_hidden_proto (ns_samename) libresolv_hidden_proto (ns_makecanon) libresolv_hidden_proto (ns_format_ttl) +extern __typeof (ns_name_ntop) __ns_name_ntop; +libc_hidden_proto (__ns_name_ntop) + # endif /* !_ISOMAC */ #endif -- cgit v1.1