summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-24 04:51:43 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-24 04:51:43 +0000
commitaf2ce50f8b158ebe22228a540c9504b9f0ee9185 (patch)
treeeada890348eba850eecb75a17228c46496973257
parent89366c47abe7a7b7ddccec9925206a005cbbe146 (diff)
- deraadt@cvs.openbsd.org 2001/03/22 20:22:55
[sshd.c] do not place linefeeds in buffer
-rw-r--r--ChangeLog5
-rw-r--r--sshd.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 736c31ad..127f372c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
- markus@cvs.openbsd.org 2001/03/23 13:10:57
[sftp-int.c]
fix put, upload to _absolute_ path, ok djm@
+ - deraadt@cvs.openbsd.org 2001/03/22 20:22:55
+ [sshd.c]
+ do not place linefeeds in buffer
20010322
- (djm) Better AIX no tty fix, spotted by Gert Doering <gert@greenie.muc.de>
@@ -4667,4 +4670,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.991.2.8 2001/03/24 04:45:42 mouring Exp $
+$Id: ChangeLog,v 1.991.2.9 2001/03/24 04:51:43 mouring Exp $
diff --git a/sshd.c b/sshd.c
index 384d4082..d32e580c 100644
--- a/sshd.c
+++ b/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>
@@ -344,8 +344,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)
@@ -353,8 +352,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;
}
}
@@ -420,7 +418,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) {