From: Michael Tremer Date: Sat, 11 Jan 2025 17:55:25 +0000 (+0000) Subject: path: Sanitize format strings for the format function X-Git-Tag: 0.9.30~425 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b4b4c5aadd9f2bbe3393750d064e24d7c4190a4;p=pakfire.git path: Sanitize format strings for the format function Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/path.h b/src/pakfire/path.h index 6ee180d3d..77ce9f23e 100644 --- a/src/pakfire/path.h +++ b/src/pakfire/path.h @@ -30,7 +30,8 @@ int __pakfire_path_normalize(char* p, const size_t length); #define pakfire_path_format(path, format, ...) \ __pakfire_path_format(path, sizeof(path), format, __VA_ARGS__) -int __pakfire_path_format(char* buffer, const size_t length, const char* format, ...); +int __pakfire_path_format(char* buffer, const size_t length, const char* format, ...) + __attribute__((format(printf, 3, 4)));; #define pakfire_path_append(path, s1, s2) \ __pakfire_path_append(path, sizeof(path), s1, s2)