diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2015-01-30 01:13:34 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2015-01-30 01:13:34 +0000 |
commit | 9a738b89a5f6d79df3a1193c1e448f3da3b6bd25 (patch) | |
tree | 3792c1292de0f986a7ad390a8259d8a0cb545c2a /usr.bin/ssh/ssh-keyscan.c | |
parent | 240a0dbe4f8df4a1bae4d53adde8aec685cd5e83 (diff) |
avoid more fatal/exit in the packet.c paths that ssh-keyscan
uses; feedback and "looks good" markus@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index e9e3cdef1cd..777be69c0c6 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/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>. * @@ -448,7 +448,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) |