From fc40b431a9049585675e171643eb308cc548713c Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 4 Jun 2012 23:32:36 +0000 Subject: [PATCH] Add missing check for failure to agree a host key algorithm. git-svn-id: svn://svn.tartarus.org/sgt/putty@9557 cda61777-01e9-0310-a592-d414129be87e --- ssh.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ssh.c b/ssh.c index 750017f6..ef503bf5 100644 --- a/ssh.c +++ b/ssh.c @@ -5778,6 +5778,12 @@ static int do_ssh2_transport(Ssh ssh, void *vin, int inlen, break; } } + if (!ssh->hostkey) { + bombout(("Couldn't agree a host key algorithm (available: %s)", + str ? str : "(null)")); + crStop(0); + } + s->guessok = s->guessok && first_in_commasep_string(hostkey_algs[0]->name, str, len); ssh_pkt_getstring(pktin, &str, &len); /* client->server cipher */ -- 2.11.0