Attempt to fix the remaining key re-exchange bug
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Feb 2001 13:55:59 +0000 (13:55 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 20 Feb 2001 13:55:59 +0000 (13:55 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@934 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index 5a7dcf2..7daae9f 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -2454,9 +2454,9 @@ static int do_ssh2_transport(unsigned char *in, int inlen, int ispkt)
      * transport. If we ever see a KEXINIT, we must go back to the
      * start.
      */
-    do {
+    while (!(ispkt && pktin.type == SSH2_MSG_KEXINIT)) {
         crReturn(1);
-    } while (!(ispkt && pktin.type == SSH2_MSG_KEXINIT));
+    }
     logevent("Server initiated key re-exchange");
     goto begin_key_exchange;