Fix by Tim Robbins <fyre@box3n.gumbynet.org> to prevent bad format
authorMatt Kraai <kraai@debian.org>
Thu, 7 Dec 2000 16:22:04 +0000 (16:22 -0000)
committerMatt Kraai <kraai@debian.org>
Thu, 7 Dec 2000 16:22:04 +0000 (16:22 -0000)
strings from being passed to syslog(3).

logger.c
sysklogd/logger.c

index 2c460cc077741cd21307140d1d4e4b8ddf49c542..8e341efe9b58c522be2b57f66ef7a74f18f29edc 100644 (file)
--- a/logger.c
+++ b/logger.c
@@ -156,7 +156,7 @@ extern int logger_main(int argc, char **argv)
        }
 
        openlog(name, option, (pri | LOG_FACMASK));
-       syslog(pri, message);
+       syslog(pri, "%s", message);
        closelog();
 
        return EXIT_SUCCESS;
index 2c460cc077741cd21307140d1d4e4b8ddf49c542..8e341efe9b58c522be2b57f66ef7a74f18f29edc 100644 (file)
@@ -156,7 +156,7 @@ extern int logger_main(int argc, char **argv)
        }
 
        openlog(name, option, (pri | LOG_FACMASK));
-       syslog(pri, message);
+       syslog(pri, "%s", message);
        closelog();
 
        return EXIT_SUCCESS;