]> git.ipfire.org Git - location/libloc.git/commitdiff
lua: Perform formatting string sanitization
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Mar 2025 18:19:03 +0000 (18:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Mar 2025 18:19:03 +0000 (18:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/lua/location.c

index 1c9488971fea0582c2f415d5df7d07efa256285d..0330827212002e29fe00323bcd69a8163b4b21ca 100644 (file)
@@ -36,6 +36,9 @@ struct loc_ctx* ctx = NULL;
 
 static int log_callback_ref = 0;
 
+static void log_callback(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_callback(struct loc_ctx* _ctx, void* data, int priority, const char* file,
                int line, const char* fn, const char* format, va_list args) {
        char* message = NULL;