summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ssh-keyscan.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 84d76a039..d8dc035bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -54,6 +54,10 @@
54 $OpenBSD$ and RCSID() cleanup: don't use RCSID() in .h files; add 54 $OpenBSD$ and RCSID() cleanup: don't use RCSID() in .h files; add
55 missing RCSID() to .c files and remove dup /*$OpenBSD$*/ from .c 55 missing RCSID() to .c files and remove dup /*$OpenBSD$*/ from .c
56 files. ok markus@ 56 files. ok markus@
57 - stevesk@cvs.openbsd.org 2002/03/04 18:30:23
58 [ssh-keyscan.c]
59 handle connection close during read of protocol version string.
60 fixes erroneous "bad greeting". ok markus@
57 61
5820020226 6220020226
59 - (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests 63 - (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests
@@ -7785,4 +7789,4 @@
7785 - Wrote replacements for strlcpy and mkdtemp 7789 - Wrote replacements for strlcpy and mkdtemp
7786 - Released 1.0pre1 7790 - Released 1.0pre1
7787 7791
7788$Id: ChangeLog,v 1.1904 2002/03/05 01:53:02 mouring Exp $ 7792$Id: ChangeLog,v 1.1905 2002/03/05 01:54:52 mouring Exp $
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 88f10ebec..824264c32 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include "includes.h" 9#include "includes.h"
10RCSID("$OpenBSD: ssh-keyscan.c,v 1.34 2002/02/22 12:20:34 markus Exp $"); 10RCSID("$OpenBSD: ssh-keyscan.c,v 1.35 2002/03/04 18:30:23 stevesk Exp $");
11 11
12#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) 12#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
13#include <sys/queue.h> 13#include <sys/queue.h>
@@ -511,6 +511,11 @@ congreet(int s)
511 conrecycle(s); 511 conrecycle(s);
512 return; 512 return;
513 } 513 }
514 if (n == 0) {
515 error("%s: Connection closed by remote host", c->c_name);
516 conrecycle(s);
517 return;
518 }
514 if (*cp != '\n' && *cp != '\r') { 519 if (*cp != '\n' && *cp != '\r') {
515 error("%s: bad greeting", c->c_name); 520 error("%s: bad greeting", c->c_name);
516 confree(s); 521 confree(s);