aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorAaron Merey <amerey@redhat.com>2025-03-20 13:13:33 -0400
committerAaron Merey <amerey@redhat.com>2025-03-24 14:43:03 -0400
commite3a6e85d67f1a48dec3e2557a83d6ce1544a58cb (patch)
treed6c34a63a2c4c2d9c362916f150c3255e1ac4fdf /sysdeps/mach
parenta71db81ed1353edd00ca2901d2fefd98c53209d3 (diff)
downloadglibc-e3a6e85d67f1a48dec3e2557a83d6ce1544a58cb.zip
glibc-e3a6e85d67f1a48dec3e2557a83d6ce1544a58cb.tar.gz
glibc-e3a6e85d67f1a48dec3e2557a83d6ce1544a58cb.tar.bz2
Add _FORTIFY_SOURCE support for inet_pton
Add function __inet_pton_chk which calls __chk_fail when the size of argument dst is too small. inet_pton is redirected to __inet_pton_chk or __inet_pton_warn when _FORTIFY_SOURCE is > 0. Also add tests to debug/tst-fortify.c, update the abilist with __inet_pton_chk and mention inet_pton fortification in maint.texi. Co-authored-by: Frédéric Bérat <fberat@redhat.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist1
-rw-r--r--sysdeps/mach/hurd/x86_64/libc.abilist1
2 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index facb01b..0b963dc 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2585,6 +2585,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust_np F
GLIBC_2.41 pthread_mutexattr_settype F
GLIBC_2.41 pthread_sigmask F
GLIBC_2.42 __inet_ntop_chk F
+GLIBC_2.42 __inet_pton_chk F
GLIBC_2.42 pthread_barrier_destroy F
GLIBC_2.42 pthread_barrier_init F
GLIBC_2.42 pthread_barrier_wait F
diff --git a/sysdeps/mach/hurd/x86_64/libc.abilist b/sysdeps/mach/hurd/x86_64/libc.abilist
index 3c76f6a..b9e9349 100644
--- a/sysdeps/mach/hurd/x86_64/libc.abilist
+++ b/sysdeps/mach/hurd/x86_64/libc.abilist
@@ -2268,6 +2268,7 @@ GLIBC_2.41 pthread_mutexattr_setrobust_np F
GLIBC_2.41 pthread_mutexattr_settype F
GLIBC_2.41 pthread_sigmask F
GLIBC_2.42 __inet_ntop_chk F
+GLIBC_2.42 __inet_pton_chk F
GLIBC_2.42 pthread_barrier_destroy F
GLIBC_2.42 pthread_barrier_init F
GLIBC_2.42 pthread_barrier_wait F