From 4a5e7b58e291e79b924835b66e5de0f88b79784a Mon Sep 17 00:00:00 2001 From: Erik Scholz Date: Mon, 1 Jan 2024 13:43:47 +0100 Subject: [PATCH] fix: never use a log message as a format string (#135) --- examples/cli/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index d01e863..327865f 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -460,13 +460,13 @@ void sd_log_cb(enum sd_log_level_t level, const char* log, void* data) { return; } if (level <= SD_LOG_INFO) { - fprintf(stdout, log); + fputs(log, stdout); fflush(stdout); } else { - fprintf(stderr, log); + fputs(log, stderr); fflush(stderr); } -}; +} int main(int argc, const char* argv[]) { SDParams params;