From afa00abb2b68205bee539d7947130d6b1b1ec6e9 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 1 Apr 2021 19:39:14 +0200 Subject: Hardened entire system By using the nonnull attribute and replace buffer-overflow-prone functions like strcpy, strcat and sprintf by strlcpy, strlcat and snprintf. --- libs/libc/alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libs/libc/alloc.c') diff --git a/libs/libc/alloc.c b/libs/libc/alloc.c index b8139d0..485a60f 100644 --- a/libs/libc/alloc.c +++ b/libs/libc/alloc.c @@ -414,8 +414,7 @@ void *malloc_debug(u32 size, const char *file, int line, const char *func, const void free_debug(void *ptr, const char *file, int line, const char *func, const char *inp) { - if (ptr) - _free(ptr); + _free(ptr); (void)file; (void)line; -- cgit v1.2.3