about summary refs log tree commit diff
path: root/resolv/Versions
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-15 08:28:50 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-15 08:39:31 +0200
commitadcc572a29169e5b571ab06b1a5bf941985d8fe6 (patch)
tree77aebfcb3ff5acaddaaed71e70abde4d39399942 /resolv/Versions
parent2ff32dd4926c7ec3bb6c09b58a12a8e828a4cc58 (diff)
downloadglibc-adcc572a29169e5b571ab06b1a5bf941985d8fe6.tar.gz
glibc-adcc572a29169e5b571ab06b1a5bf941985d8fe6.tar.xz
glibc-adcc572a29169e5b571ab06b1a5bf941985d8fe6.zip
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 <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/Versions')
-rw-r--r--resolv/Versions7
1 files changed, 5 insertions, 2 deletions
diff --git a/resolv/Versions b/resolv/Versions
index 3b5328301a..4bf1a13d48 100644
--- a/resolv/Versions
+++ b/resolv/Versions
@@ -24,6 +24,9 @@ libc {
     getaddrinfo_a;
 %endif
   }
+  GLIBC_2.9 {
+    ns_name_ntop;
+  }
   GLIBC_2.34 {
 %if PTHREAD_IN_LIBC
     gai_cancel;
@@ -31,6 +34,7 @@ libc {
     gai_suspend;
     getaddrinfo_a;
 %endif
+    ns_name_ntop;
   }
   GLIBC_PRIVATE {
 %if !PTHREAD_IN_LIBC
@@ -40,6 +44,7 @@ libc {
     __inet_aton_exact;
     __inet_pton_length;
     __res_iclose;
+    __ns_name_ntop;
     __resolv_context_get;
     __resolv_context_get_override;
     __resolv_context_get_preinit;
@@ -137,7 +142,6 @@ libresolv {
     ns_msg_getflag;
     ns_name_compress;
     ns_name_ntol;
-    ns_name_ntop;
     ns_name_pack;
     ns_name_pton;
     ns_name_rollback;
@@ -158,7 +162,6 @@ libresolv {
   GLIBC_PRIVATE {
     __ns_get16;
     __ns_get32;
-    __ns_name_ntop;
     __ns_name_unpack;
     __res_context_hostalias;
     __res_context_query;