Don't allocate space for empty banners. Makes me able to connect various
authorHasso Tepper <hasso@dragonflybsd.org>
Fri, 3 Oct 2008 12:30:07 +0000 (12:30 +0000)
committerHasso Tepper <hasso@dragonflybsd.org>
Fri, 3 Oct 2008 12:30:07 +0000 (12:30 +0000)
network equipment again.

Obtained-from: OpenBSD CVS

crypto/openssh-5/sshconnect2.c

index 389bec9..868f269 100644 (file)
@@ -383,7 +383,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
        debug3("input_userauth_banner");
        raw = packet_get_string(&len);
        lang = packet_get_string(NULL);
-       if (options.log_level >= SYSLOG_LEVEL_INFO) {
+       if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO) {
                if (len > 65536)
                        len = 65536;
                msg = xmalloc(len * 4); /* max expansion from strnvis() */