summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-22 22:45:33 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-22 22:45:33 +0000
commit69d8c077d4043b7a646b9811f7bde1f0abee3977 (patch)
treee8c16b91bdfd6485bfc52801a83c1c9244d1d6fe /sshd.c
parentd9267454caaa0fefd71a12aaa4288ee72b984292 (diff)
- deraadt@cvs.openbsd.org 2001/03/22 20:22:55
[sshd.c] do not place linefeeds in buffer
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sshd.c b/sshd.c
index 384d4082d..d32e580c2 100644
--- a/sshd.c
+++ b/sshd.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: sshd.c,v 1.175 2001/03/18 23:30:55 deraadt Exp $"); 43RCSID("$OpenBSD: sshd.c,v 1.176 2001/03/22 20:22:55 deraadt Exp $");
44 44
45#include <openssl/dh.h> 45#include <openssl/dh.h>
46#include <openssl/bn.h> 46#include <openssl/bn.h>
@@ -344,8 +344,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
344 fatal_cleanup(); 344 fatal_cleanup();
345 } 345 }
346 if (buf[i] == '\r') { 346 if (buf[i] == '\r') {
347 buf[i] = '\n'; 347 buf[i] = 0;
348 buf[i + 1] = 0;
349 /* Kludge for F-Secure Macintosh < 1.0.2 */ 348 /* Kludge for F-Secure Macintosh < 1.0.2 */
350 if (i == 12 && 349 if (i == 12 &&
351 strncmp(buf, "SSH-1.5-W1.0", 12) == 0) 350 strncmp(buf, "SSH-1.5-W1.0", 12) == 0)
@@ -353,8 +352,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
353 continue; 352 continue;
354 } 353 }
355 if (buf[i] == '\n') { 354 if (buf[i] == '\n') {
356 /* buf[i] == '\n' */ 355 buf[i] = 0;
357 buf[i + 1] = 0;
358 break; 356 break;
359 } 357 }
360 } 358 }
@@ -420,7 +418,6 @@ sshd_exchange_identification(int sock_in, int sock_out)
420 break; 418 break;
421 } 419 }
422 chop(server_version_string); 420 chop(server_version_string);
423 chop(client_version_string);
424 debug("Local version string %.200s", server_version_string); 421 debug("Local version string %.200s", server_version_string);
425 422
426 if (mismatch) { 423 if (mismatch) {