From 2ec000d5480d557632594199897f58e3cfb6aa79 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Thu, 27 Dec 2001 18:22:17 +0000 Subject: call fatal() for openssl allocation failures --- usr.bin/ssh/sshd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh/sshd.c') 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 #include @@ -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(); -- cgit v1.2.3