fix: never use a log message as a format string (#135)

This commit is contained in:
Erik Scholz 2024-01-01 13:43:47 +01:00 committed by GitHub
parent 2e79a82f85
commit 4a5e7b58e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;