diff options
author | 2001-12-27 18:22:16 +0000 | |
---|---|---|
committer | 2001-12-27 18:22:16 +0000 | |
commit | 8f44bd53e2101ef6105a3fc353079aaaebdefc48 (patch) | |
tree | 9391d4b87ee62a37352bd63416dddad9e4535086 /usr.bin/ssh/ssh-dss.c | |
parent | -t is only needed for key generation (unbreaks -i, -e, etc). (diff) | |
download | wireguard-openbsd-8f44bd53e2101ef6105a3fc353079aaaebdefc48.tar.xz wireguard-openbsd-8f44bd53e2101ef6105a3fc353079aaaebdefc48.zip |
call fatal() for openssl allocation failures
Diffstat (limited to 'usr.bin/ssh/ssh-dss.c')
-rw-r--r-- | usr.bin/ssh/ssh-dss.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh-dss.c b/usr.bin/ssh/ssh-dss.c index 30bd1f8cbe6..bd709a22660 100644 --- a/usr.bin/ssh/ssh-dss.c +++ b/usr.bin/ssh/ssh-dss.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-dss.c,v 1.10 2001/12/05 10:06:12 deraadt Exp $"); +RCSID("$OpenBSD: ssh-dss.c,v 1.11 2001/12/27 18:22:16 markus Exp $"); #include <openssl/bn.h> #include <openssl/evp.h> @@ -158,9 +158,12 @@ ssh_dss_verify( } /* parse signature */ - sig = DSA_SIG_new(); - sig->r = BN_new(); - sig->s = BN_new(); + if ((sig = DSA_SIG_new()) == NULL) + fatal("ssh_dss_verify: DSA_SIG_new failed"); + if ((sig->r = BN_new()) == NULL) + fatal("ssh_dss_verify: BN_new failed"); + if ((sig->s = BN_new()) == NULL) + fatal("ssh_dss_verify: BN_new failed"); BN_bin2bn(sigblob, INTBLOB_LEN, sig->r); BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s); |