From: Michael Tremer Date: Thu, 6 Mar 2025 18:10:56 +0000 (+0000) Subject: log: Perform formatting string sanitation when logging to stderr X-Git-Tag: 0.9.18~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c4d095dcf61dfc5de68cc58722bf3614e6221d2;p=location%2Flibloc.git log: Perform formatting string sanitation when logging to stderr Signed-off-by: Michael Tremer --- diff --git a/src/libloc.c b/src/libloc.c index 5d1b87e..c2deed7 100644 --- a/src/libloc.c +++ b/src/libloc.c @@ -51,6 +51,10 @@ void loc_log(struct loc_ctx* ctx, va_end(args); } +static void log_stderr(struct loc_ctx* ctx, void* data, int priority, + const char* file, int line, const char* fn, const char* format, va_list args) + __attribute__((format(printf, 7, 0))); + static void log_stderr(struct loc_ctx* ctx, void* data, int priority, const char* file, int line, const char* fn, const char* format, va_list args) {