From: simon Date: Mon, 4 Jun 2012 23:32:36 +0000 (+0000) Subject: Add missing check for failure to agree a host key algorithm. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/fc40b431a9049585675e171643eb308cc548713c 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 --- 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 */