From: Matt Kraai Date: Thu, 7 Dec 2000 16:22:04 +0000 (-0000) Subject: Fix by Tim Robbins to prevent bad format X-Git-Tag: 0_48~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7b5c16ebe5f1b057603cf1c0b0187be418725c42;p=oweals%2Fbusybox.git Fix by Tim Robbins to prevent bad format strings from being passed to syslog(3). --- diff --git a/logger.c b/logger.c index 2c460cc07..8e341efe9 100644 --- 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; diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 2c460cc07..8e341efe9 100644 --- a/sysklogd/logger.c +++ b/sysklogd/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;