diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2008-09-24 21:17:14 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2008-09-24 21:17:14 +0000 |
commit | 253b32b7361cb92581c009824ea0621c566efeba (patch) | |
tree | d040a694c808d9046d1d7309cc7be46a7daa2645 | |
parent | 7699430e4880decc9e190f6f6b78ab7106b4eea5 (diff) | |
download | src-253b32b7361cb92581c009824ea0621c566efeba.tar.gz src-253b32b7361cb92581c009824ea0621c566efeba.zip |
Notes
-rw-r--r-- | sshconnect2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 389bec9e43b4..067c875df1b9 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -386,8 +386,9 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt) if (options.log_level >= SYSLOG_LEVEL_INFO) { if (len > 65536) len = 65536; - msg = xmalloc(len * 4); /* max expansion from strnvis() */ + msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */ strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL); + msg[len*4] = '\0'; fprintf(stderr, "%s", msg); xfree(msg); } |