[PATCH] Large log output does not print newline

Oliver Gasser gasser at in.tum.de
Wed Dec 5 12:58:18 EST 2012


Hi,

I think I found a minor bug in OpenSSH's log functionality: If a log
message which is larger than MSGBUFSIZE=1024 and logged to stderr, then the
newline (\r\n) is not printed. This is due to the fact that the newline is
added after the log message concatenated with "\r\n" is snprintf'd to
another buffer of the same size. If the source buffer (fmtbuf) would
already fill the destination buffer (msgbuf), then the additional "\r\n"
are of course never written into the destination buffer. See the one-line
attached patch.

Could it be possible to make the size limit for log messages dynamic, e.g.
via ssh_config? Or is the fixed limit of 1024 characters there on purpose?

Kind regards,
Oliver Gasser


More information about the openssh-unix-dev mailing list