Bugzilla – Attachment 2957 Details for
Bug 2688
Long log messages to stderr missing newlines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
include room for \r\n in sprintf
bz2688.diff (text/plain), 543 bytes, created by
Damien Miller
on 2017-03-10 14:05:54 AEDT
(
hide
)
Description:
include room for \r\n in sprintf
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-03-10 14:05:54 AEDT
Size:
543 bytes
patch
obsolete
>diff --git a/log.c b/log.c >index 6228989..6781c9a 100644 >--- a/log.c >+++ b/log.c >@@ -416,7 +416,8 @@ 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) { >- snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); >+ snprintf(msgbuf, sizeof msgbuf, "%.*s\r\n", >+ (int)sizeof msgbuf - 3, fmtbuf); > (void)write(log_stderr_fd, msgbuf, strlen(msgbuf)); > } else { > openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sdata);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2688
: 2957