1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Add missing check for failure to agree a host key algorithm.

[originally from svn r9557]
This commit is contained in:
Simon Tatham 2012-06-04 23:32:36 +00:00
parent 799f7f563d
commit a46aac386b

6
ssh.c
View File

@ -5778,6 +5778,12 @@ static int do_ssh2_transport(Ssh ssh, void *vin, int inlen,
break; break;
} }
} }
if (!ssh->hostkey) {
bombout(("Couldn't agree a host key algorithm (available: %s)",
str ? str : "(null)"));
crStop(0);
}
s->guessok = s->guessok && s->guessok = s->guessok &&
first_in_commasep_string(hostkey_algs[0]->name, str, len); first_in_commasep_string(hostkey_algs[0]->name, str, len);
ssh_pkt_getstring(pktin, &str, &len); /* client->server cipher */ ssh_pkt_getstring(pktin, &str, &len); /* client->server cipher */