diff options
author | 2015-01-30 01:13:33 +0000 | |
---|---|---|
committer | 2015-01-30 01:13:33 +0000 | |
commit | 7b0d3b43d94ebf806a0e2210b08153f632e3b783 (patch) | |
tree | 7187279c498eb90db02d7df11c60387e5848c327 /usr.bin/ssh/ssh_api.c | |
parent | regression test for 'wildcard CA' serial/key ID revocations (diff) | |
download | wireguard-openbsd-7b0d3b43d94ebf806a0e2210b08153f632e3b783.tar.xz wireguard-openbsd-7b0d3b43d94ebf806a0e2210b08153f632e3b783.zip |
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_api.c')
-rw-r--r-- | usr.bin/ssh/ssh_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh_api.c b/usr.bin/ssh/ssh_api.c index 68cc69156b6..27511eb69b3 100644 --- a/usr.bin/ssh/ssh_api.c +++ b/usr.bin/ssh/ssh_api.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh_api.c,v 1.2 2015/01/26 06:10:03 djm Exp $ */ +/* $OpenBSD: ssh_api.c,v 1.3 2015/01/30 01:13:33 djm Exp $ */ /* * Copyright (c) 2012 Markus Friedl. All rights reserved. * @@ -83,7 +83,8 @@ ssh_init(struct ssh **sshp, int is_server, struct kex_params *kex_params) called = 1; } - ssh = ssh_packet_set_connection(NULL, -1, -1); + if ((ssh = ssh_packet_set_connection(NULL, -1, -1)) == NULL) + return SSH_ERR_ALLOC_FAIL; if (is_server) ssh_packet_set_server(ssh); |