diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-03-22 20:22:56 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-03-22 20:22:56 +0000 |
commit | a7bd78a2784a060a8a60b3fccab7e5c839b0d8ea (patch) | |
tree | 7e9bd284423111151de6a78b599c2abfd3d447bb /usr.bin/ssh/sshd.c | |
parent | c88a46b5d65f79ae7534458334af7b8ea47b443f (diff) |
do not place linefeeds in buffer
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r-- | usr.bin/ssh/sshd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 0a38665ee13..8875c96e609 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.175 2001/03/18 23:30:55 deraadt Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.176 2001/03/22 20:22:55 deraadt Exp $"); #include <openssl/dh.h> #include <openssl/bn.h> @@ -335,8 +335,7 @@ sshd_exchange_identification(int sock_in, int sock_out) fatal_cleanup(); } if (buf[i] == '\r') { - buf[i] = '\n'; - buf[i + 1] = 0; + buf[i] = 0; /* Kludge for F-Secure Macintosh < 1.0.2 */ if (i == 12 && strncmp(buf, "SSH-1.5-W1.0", 12) == 0) @@ -344,8 +343,7 @@ sshd_exchange_identification(int sock_in, int sock_out) continue; } if (buf[i] == '\n') { - /* buf[i] == '\n' */ - buf[i + 1] = 0; + buf[i] = 0; break; } } @@ -411,7 +409,6 @@ sshd_exchange_identification(int sock_in, int sock_out) break; } chop(server_version_string); - chop(client_version_string); debug("Local version string %.200s", server_version_string); if (mismatch) { |