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/libtxt/xml.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/libtxt/xml.h') diff --git a/libs/libtxt/xml.h b/libs/libtxt/xml.h index 43a8005..3f5c74d 100644 --- a/libs/libtxt/xml.h +++ b/libs/libtxt/xml.h @@ -44,8 +44,8 @@ struct xml { }; enum xml_error xml_parse(struct xml *parser, const char *buffer, u32 buffer_length, - struct xml_token *tokens, u32 num_tokens); + struct xml_token *tokens, u32 num_tokens) NONNULL; -void xml_init(struct xml *parser); +void xml_init(struct xml *parser) NONNULL; #endif -- cgit v1.2.3