diff options
| author | Frédéric Bérat <fberat@redhat.com> | 2025-03-07 14:42:26 +0100 |
|---|---|---|
| committer | Frédéric Bérat <fberat@redhat.com> | 2025-03-21 09:35:16 +0100 |
| commit | 84373ef7b72c9c8ab61ce1fdfd798777715a1a52 (patch) | |
| tree | 2712a37ae318e7c9bbd2055aa044b287896d3eeb /resolv | |
| parent | c5113a838b28a8894da19794ca7a69c5ace959a3 (diff) | |
| download | glibc-84373ef7b72c9c8ab61ce1fdfd798777715a1a52.tar.xz glibc-84373ef7b72c9c8ab61ce1fdfd798777715a1a52.zip | |
Prepare inet_ntop to be fortified
Rename inet_ntop to __inet_ntop and create the inet_ntop weak alias
based on it in order to prepare for disabling fortification when
available.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'resolv')
| -rw-r--r-- | resolv/inet_ntop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/resolv/inet_ntop.c b/resolv/inet_ntop.c index c4d38c0f95..acf5f3cb88 100644 --- a/resolv/inet_ntop.c +++ b/resolv/inet_ntop.c @@ -42,7 +42,7 @@ static const char *inet_ntop4 (const u_char *src, char *dst, socklen_t size); static const char *inet_ntop6 (const u_char *src, char *dst, socklen_t size); /* char * - * inet_ntop(af, src, dst, size) + * __inet_ntop(af, src, dst, size) * convert a network format address to presentation format. * return: * pointer to presentation format address (`dst'), or NULL (see errno). @@ -50,7 +50,7 @@ static const char *inet_ntop6 (const u_char *src, char *dst, socklen_t size); * Paul Vixie, 1996. */ const char * -inet_ntop (int af, const void *src, char *dst, socklen_t size) +__inet_ntop (int af, const void *src, char *dst, socklen_t size) { switch (af) { case AF_INET: @@ -63,7 +63,8 @@ inet_ntop (int af, const void *src, char *dst, socklen_t size) } /* NOTREACHED */ } -libc_hidden_def (inet_ntop) +libc_hidden_def (__inet_ntop) +weak_alias (__inet_ntop, inet_ntop) /* const char * * inet_ntop4(src, dst, size) |
