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/libgui/bmp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/libgui/bmp.h') diff --git a/libs/libgui/bmp.h b/libs/libgui/bmp.h index ff8360b..f7fb57f 100644 --- a/libs/libgui/bmp.h +++ b/libs/libgui/bmp.h @@ -11,7 +11,7 @@ struct bmp_header { u32 size; u32 reserved; u32 offset; -} __attribute__((packed)); +} PACKED; struct bmp_info { u32 size; @@ -34,6 +34,6 @@ struct bmp { u32 pitch; }; -struct bmp *bmp_load(const char *path); +struct bmp *bmp_load(const char *path) NONNULL; #endif -- cgit v1.2.3