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 e59eacac..989f7ecc 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.97 2015/01/28 21:15:47 djm Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.98 2015/01/30 01:13:33 djm Exp $ */ /* * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. * @@ -466,7 +466,8 @@ congreet(int s) return; } *cp = '\0'; - c->c_ssh = ssh_packet_set_connection(NULL, s, s); + if ((c->c_ssh = ssh_packet_set_connection(NULL, s, s)) == NULL) + fatal("ssh_packet_set_connection failed"); ssh_set_app_data(c->c_ssh, c); /* back link */ if (sscanf(buf, "SSH-%d.%d-%[^\n]\n", &remote_major, &remote_minor, remote_version) == 3) |