summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 18cbbd9f9..185e7b204 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -441,8 +441,9 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
441 if (options.log_level >= SYSLOG_LEVEL_INFO) { 441 if (options.log_level >= SYSLOG_LEVEL_INFO) {
442 if (len > 65536) 442 if (len > 65536)
443 len = 65536; 443 len = 65536;
444 msg = xmalloc(len * 4); /* max expansion from strnvis() */ 444 msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
445 strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL); 445 strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
446 msg[len*4] = '\0';
446 fprintf(stderr, "%s", msg); 447 fprintf(stderr, "%s", msg);
447 xfree(msg); 448 xfree(msg);
448 } 449 }