summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--sshconnect2.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 925cb8a62..3702aaab2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ openssh (1:5.1p1-3) UNRELEASED; urgency=low
5 * Configure with --disable-strip; dh_strip will deal with stripping 5 * Configure with --disable-strip; dh_strip will deal with stripping
6 binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link; 6 binaries and will honour DEB_BUILD_OPTIONS (thanks, Bernhard R. Link;
7 closes: #498681). 7 closes: #498681).
8 * Fix handling of zero-length server banners (thanks, Tomas Mraz; closes:
9 #497026).
8 10
9 -- Colin Watson <cjwatson@debian.org> Mon, 25 Aug 2008 09:52:33 +0100 11 -- Colin Watson <cjwatson@debian.org> Mon, 25 Aug 2008 09:52:33 +0100
10 12
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 }