From 77343d7052afab6e4ceb512ec3537b5434586a7d Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Tue, 3 Dec 2013 11:11:56 +0100 Subject: [PATCH] mitigate format-string vulnerability in syslog() Fixes: hdapsd fails to build if "-Werror=format-security" flag is used. ... hdapsd.c:91:3: error: format not a string literal and no format arguments [-Werror=format-security] More info at: https://fedoraproject.org/wiki/Format-Security-FAQ --- src/hdapsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hdapsd.c b/src/hdapsd.c index bc74794..2809bf2 100644 --- a/src/hdapsd.c +++ b/src/hdapsd.c @@ -88,7 +88,7 @@ void printlog (FILE *stream, const char *fmt, ...) va_end(ap); if (dosyslog) - syslog(LOG_INFO, msg); + syslog(LOG_INFO, "%s", msg); else { now = time((time_t *)NULL); fprintf(stream, "%.24s: %s\n", ctime(&now), msg); -- 2.11.4.GIT