From 6ca1d5ded0e9819957bfa34de98fe63d2857930e Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 2 Aug 2000 03:22:37 +0000 Subject: fatal(): Close SF bug #110401 and potential local security hole by formatting user supplied input. Also added newlines to both stderr and syslog output for more consistent formatting. Reported by Stan Bubrouski. --- src/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.c b/src/common.c index 11cef7b69..734171b71 100644 --- a/src/common.c +++ b/src/common.c @@ -78,7 +78,7 @@ fatal(const char* ident, int exitcode, char* format, ...) * should definitely know about any problems. */ openlog(ident, LOG_CONS, LOG_MAIL); - syslog(LOG_ERR, "%s", log_entry); + syslog(LOG_ERR, "%s\n", log_entry); closelog(); #endif /* HAVE_SYSLOG */ @@ -108,7 +108,7 @@ fatal(const char* ident, int exitcode, char* format, ...) printf("\n"); } else - fprintf(stderr, log_entry); + fprintf(stderr, "%s\n", log_entry); #endif /* HELPFUL */ exit(exitcode); } -- cgit v1.3.1