2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Add missing newline when logging to a file (not syslog) and

loglinelen is set to a non-positive number.  Bug #742
This commit is contained in:
Todd C. Miller
2016-04-26 14:39:42 -06:00
parent 3e9702580e
commit 57b1dc5e1d

View File

@@ -176,6 +176,7 @@ do_logfile(const char *msg)
if ((size_t)def_loglinelen < sizeof(LOG_INDENT)) {
/* Don't pretty-print long log file lines (hard to grep). */
(void) fputs(full_line, fp);
(void) fputc('\n', fp);
} else {
/* Write line with word wrap around def_loglinelen chars. */
writeln_wrap(fp, full_line, len, def_loglinelen);