From e3a6e85d67f1a48dec3e2557a83d6ce1544a58cb Mon Sep 17 00:00:00 2001 From: Aaron Merey Date: Thu, 20 Mar 2025 13:13:33 -0400 Subject: Add _FORTIFY_SOURCE support for inet_pton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Florian Weimer --- debug/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'debug/Makefile') diff --git a/debug/Makefile b/debug/Makefile index 2484580cd2..40201844b3 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -56,6 +56,7 @@ routines = \ gets_chk \ getwd_chk \ inet_ntop_chk \ + inet_pton_chk \ longjmp_chk \ mbsnrtowcs_chk \ mbsrtowcs_chk \ -- cgit v1.2.3