vishalmishra434 / rpms / openssh

Forked from rpms/openssh a month ago
Clone
Tomáš Mráz 578f0d
diff -up openssh-5.1p1/sshconnect2.c.bannerlen openssh-5.1p1/sshconnect2.c
Tomáš Mráz 578f0d
--- openssh-5.1p1/sshconnect2.c.bannerlen	2008-07-23 19:18:15.000000000 +0200
Tomáš Mráz 578f0d
+++ openssh-5.1p1/sshconnect2.c	2008-07-31 11:16:51.000000000 +0200
Tomáš Mráz 578f0d
@@ -387,8 +387,9 @@ input_userauth_banner(int type, u_int32_
Tomáš Mráz 578f0d
 	if (options.log_level >= SYSLOG_LEVEL_INFO) {
Tomáš Mráz 578f0d
 		if (len > 65536)
Tomáš Mráz 578f0d
 			len = 65536;
Tomáš Mráz 578f0d
-		msg = xmalloc(len * 4); /* max expansion from strnvis() */
Tomáš Mráz 578f0d
+		msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
Tomáš Mráz 578f0d
 		strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL);
Tomáš Mráz 578f0d
+		msg[len*4] = '\0';
Tomáš Mráz 578f0d
 		fprintf(stderr, "%s", msg);
Tomáš Mráz 578f0d
 		xfree(msg);
Tomáš Mráz 578f0d
 	}