diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-12-27 18:22:17 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-12-27 18:22:17 +0000 |
commit | 2ec000d5480d557632594199897f58e3cfb6aa79 (patch) | |
tree | 9e3ec502a9b19860e5d5a6e123c0b1967fd9192c /usr.bin/ssh/sshd.c | |
parent | fb712980169edaed215ac2c11bb2a86a029f6037 (diff) |
call fatal() for openssl allocation failures
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r-- | usr.bin/ssh/sshd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 8ec6b764674..8ad4e494175 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.217 2001/12/19 07:18:56 deraadt Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.218 2001/12/27 18:22:16 markus Exp $"); #include <openssl/dh.h> #include <openssl/bn.h> @@ -1319,7 +1319,8 @@ do_ssh1_kex(void) debug("Encryption type: %.200s", cipher_name(cipher_type)); /* Get the encrypted integer. */ - session_key_int = BN_new(); + if ((session_key_int = BN_new()) == NULL) + fatal("do_ssh1_kex: BN_new failed"); packet_get_bignum(session_key_int, &slen); protocol_flags = packet_get_int(); |