[PATCH] Large log output does not print newline
Oliver Gasser
gasser at in.tum.de
Wed Dec 5 19:09:08 EST 2012
Second try for the patch. Otherwise, here is the .patch's content:
diff --git a/log.c b/log.c
index ad5a10b..de3f451 100644
--- a/log.c
+++ b/log.c
@@ -413,6 +413,7 @@ do_log(LogLevel level, const char *fmt, va_list args)
tmp_handler(level, fmtbuf, log_handler_ctx);
log_handler = tmp_handler;
} else if (log_on_stderr) {
+ fmtbuf[sizeof(fmtbuf)-3] = '\0';
snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf);
write(STDERR_FILENO, msgbuf, strlen(msgbuf));
} else {
On Wed, Dec 5, 2012 at 3:15 AM, Peter Stuge <peter at stuge.se> wrote:
> Oliver Gasser wrote:
> > one-line attached patch.
>
> No patch. Make sure mimetype is text/plain.
>
>
> //Peter
>
-------------- next part --------------
diff --git a/log.c b/log.c
index ad5a10b..de3f451 100644
--- a/log.c
+++ b/log.c
@@ -413,6 +413,7 @@ do_log(LogLevel level, const char *fmt, va_list args)
tmp_handler(level, fmtbuf, log_handler_ctx);
log_handler = tmp_handler;
} else if (log_on_stderr) {
+ fmtbuf[sizeof(fmtbuf)-3] = '\0';
snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf);
write(STDERR_FILENO, msgbuf, strlen(msgbuf));
} else {
More information about the openssh-unix-dev
mailing list