diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-01-30 01:13:33 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-30 12:18:59 +1100 |
commit | 4509b5d4a4fa645a022635bfa7e86d09b285001f (patch) | |
tree | cb94ac37e4d5c59a3a5c2cde3b6c76363e7035d3 /ssh-keyscan.c | |
parent | 669aee994348468af8b4b2ebd29b602cf2860b22 (diff) |
upstream commit
avoid more fatal/exit in the packet.c paths that
ssh-keyscan uses; feedback and "looks good" markus@
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r-- | ssh-keyscan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c index e59eacace..989f7ecce 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keyscan.c,v 1.97 2015/01/28 21:15:47 djm Exp $ */ | 1 | /* $OpenBSD: ssh-keyscan.c,v 1.98 2015/01/30 01:13:33 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. | 3 | * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. |
4 | * | 4 | * |
@@ -466,7 +466,8 @@ congreet(int s) | |||
466 | return; | 466 | return; |
467 | } | 467 | } |
468 | *cp = '\0'; | 468 | *cp = '\0'; |
469 | c->c_ssh = ssh_packet_set_connection(NULL, s, s); | 469 | if ((c->c_ssh = ssh_packet_set_connection(NULL, s, s)) == NULL) |
470 | fatal("ssh_packet_set_connection failed"); | ||
470 | ssh_set_app_data(c->c_ssh, c); /* back link */ | 471 | ssh_set_app_data(c->c_ssh, c); /* back link */ |
471 | if (sscanf(buf, "SSH-%d.%d-%[^\n]\n", | 472 | if (sscanf(buf, "SSH-%d.%d-%[^\n]\n", |
472 | &remote_major, &remote_minor, remote_version) == 3) | 473 | &remote_major, &remote_minor, remote_version) == 3) |