From: Simon Tatham Date: Mon, 4 Jun 2012 23:32:36 +0000 (+0000) Subject: Add missing check for failure to agree a host key algorithm. X-Git-Tag: 0.63~195 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=a46aac386b20e6474d45f701a96d7afc8cfdafec;p=PuTTY.git Add missing check for failure to agree a host key algorithm. [originally from svn r9557] --- 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 */