Permalink
Browse files

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
  • Loading branch information...
1 parent 8482e68 commit b8229ea5aa2b8c75656a7c21b1cf1e3870c4b441 simon committed Jun 4, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 ssh.c
View
6 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 */

0 comments on commit b8229ea

Please sign in to comment.