X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/78e71de13e688b0aef0128115c0f23d5d52b5aa7..6df3c104f2ee9429bef67134ec0eedd5cd26cc08:/ssh.c 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 */