Browse Source

lib/error.c: added a proper format string to a call to syslog(3),
instead of using the logged string as the format string.

Wictor Lund 4 years ago
parent
commit
61df24e826
1 changed files with 1 additions and 1 deletions
  1. 1 1
      symon/lib/error.c

+ 1 - 1
symon/lib/error.c

@@ -93,7 +93,7 @@ output_message(int level, char *fmt, va_list args)
               __FILE__, __LINE__);
 
     if (flag_daemon) {
-        syslog(logmapping[loglevel].priority, msgbuf);
+        syslog(logmapping[loglevel].priority, "%s", msgbuf);
     } else {
         if (strlen(logmapping[loglevel].errtxt) > 0) {
             fprintf(logmapping[loglevel].stream == SYMON_OUT_STDERR ? stderr : stdout, "%.200s: %.200s\n",