]> andersk Git - openssh.git/commitdiff
- stevesk@cvs.openbsd.org 2002/03/04 18:30:23
authormouring <mouring>
Tue, 5 Mar 2002 01:54:52 +0000 (01:54 +0000)
committermouring <mouring>
Tue, 5 Mar 2002 01:54:52 +0000 (01:54 +0000)
     [ssh-keyscan.c]
     handle connection close during read of protocol version string.
     fixes erroneous "bad greeting".  ok markus@

ChangeLog
ssh-keyscan.c

index ebc8da5d8ca119e538256841d959df5e508088a4..a29972f7a16f5904e4b55ed884a6bc2fb400ef40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      $OpenBSD$ and RCSID() cleanup: don't use RCSID() in .h files; add
      missing RCSID() to .c files and remove dup /*$OpenBSD$*/ from .c
      files.  ok markus@
+   - stevesk@cvs.openbsd.org 2002/03/04 18:30:23
+     [ssh-keyscan.c]
+     handle connection close during read of protocol version string.
+     fixes erroneous "bad greeting".  ok markus@
 
 20020226
  - (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests
index 88f10ebec76e6537261ef8e6753d47844393e97f..824264c32bcd150ed5bef58493d157d0a5bc1163 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-keyscan.c,v 1.34 2002/02/22 12:20:34 markus Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.35 2002/03/04 18:30:23 stevesk Exp $");
 
 #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
 #include <sys/queue.h>
@@ -511,6 +511,11 @@ congreet(int s)
                conrecycle(s);
                return;
        }
+       if (n == 0) {
+               error("%s: Connection closed by remote host", c->c_name);
+               conrecycle(s);
+               return;
+       }
        if (*cp != '\n' && *cp != '\r') {
                error("%s: bad greeting", c->c_name);
                confree(s);
This page took 0.043558 seconds and 5 git commands to generate.