From 5e8b3ea19d045110e8e324cab3208de275d66244 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 3 Jan 2001 00:06:46 +0000 Subject: Logger forgot to NULL terminate strings from stdin. --- sysklogd/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysklogd') diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 21906401f..3d02979c8 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -130,6 +130,7 @@ extern int logger_main(int argc, char **argv) while ((c = getc(stdin)) != EOF && i < sizeof(buf)) { buf[i++] = c; } + buf[i++] = '\0'; message = buf; } else { len = 1; /* for the '\0' */ @@ -147,7 +148,6 @@ extern int logger_main(int argc, char **argv) openlog(name, option, (pri | LOG_FACMASK)); syslog(pri, "%s", message); closelog(); - return EXIT_SUCCESS; } -- cgit v1.2.3