From 1becad43298e74ba73bc66f9d44523e5d121c667 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 20 May 2024 14:48:35 +0200 Subject: Add vasprintf/asprintf The only hardening being done here is to set the char** parameter to thos functions to NULL in case of an error, to prevent it from being used should people forget to check return values. This is already done on some BSD, as well as in Rocky Linux. --- tests/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index c18898e..32b17b0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,4 +1,4 @@ -CFLAGS+=-I../include/ -D_FORTIFY_SOURCE=3 -static -O2 -DPEDANTIC_CHECKS +CFLAGS+=-I../include/ -D_FORTIFY_SOURCE=3 -static -O2 -DPEDANTIC_CHECKS -Wno-format COMPTIME_TARGETS= \ test_memcpy_overwrite_under \ @@ -12,6 +12,7 @@ RUNTIME_TARGETS= \ test_FD_SET_negative \ test_FD_ISSET_SETSIZE \ test_FD_ISSET_negative \ + test_asprintf \ test_bcopy_dynamic_read \ test_bcopy_dynamic_write \ test_bcopy_static_read \ @@ -126,11 +127,12 @@ RUNTIME_TARGETS= \ test_ttyname_r_dynamic \ test_ttyname_r_static \ test_umask \ + test_vasprintf \ + test_vfprintf \ + test_vprintf \ test_vsnprintf_dynamic \ test_vsnprintf_static \ test_vsprintf \ - test_vfprintf \ - test_vprintf \ test_wcscat_static_write \ test_wcscpy_static_write \ test_wcsncat_static_write \ -- cgit v1.3