From e7c10a1b27be94a09bb03bf31b4b66233e3d1bdc Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 9 Jul 2023 19:14:44 +0200 Subject: Add some malloc annotations --- include/stdlib.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/stdlib.h') diff --git a/include/stdlib.h b/include/stdlib.h index 38015d4..b661862 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -36,6 +36,14 @@ __extension__ extern "C" { #endif +#undef malloc + +__malloc(malloc (free, 1)) +_FORTIFY_FN(malloc) void *malloc(size_t __s) +{ + return __orig_malloc(__s); +} + /* FIXME clang */ #if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__) #undef realpath -- cgit v1.3