diff options
author | miod <> | 2015-02-14 15:10:39 +0000 |
---|---|---|
committer | miod <> | 2015-02-14 15:10:39 +0000 |
commit | a50ada071c44ffc00ef0d3ed509d23aa02005dd5 (patch) | |
tree | b9a19a97c2ebad3afbecf7d9352250124866c745 /src/lib/libcrypto/rsa/rsa_eay.c | |
parent | 6a4ab9711b4115f8a6cc669e925100cfef113829 (diff) | |
download | openbsd-a50ada071c44ffc00ef0d3ed509d23aa02005dd5.tar.gz openbsd-a50ada071c44ffc00ef0d3ed509d23aa02005dd5.tar.bz2 openbsd-a50ada071c44ffc00ef0d3ed509d23aa02005dd5.zip |
Check for allocation error in RSA_eay_mod_exp(). Coverity CID 25217.
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_eay.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index 0eb18cf3c7..74d40611ee 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/lib/libcrypto/rsa/rsa_eay.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_eay.c,v 1.37 2015/02/09 15:49:22 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_eay.c,v 1.38 2015/02/14 15:10:39 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -730,6 +730,10 @@ RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) | |||
730 | r1 = BN_CTX_get(ctx); | 730 | r1 = BN_CTX_get(ctx); |
731 | m1 = BN_CTX_get(ctx); | 731 | m1 = BN_CTX_get(ctx); |
732 | vrfy = BN_CTX_get(ctx); | 732 | vrfy = BN_CTX_get(ctx); |
733 | if (r1 == NULL || m1 == NULL || vrfy == NULL) { | ||
734 | RSAerr(RSA_F_RSA_EAY_MOD_EXP, ERR_R_MALLOC_FAILURE); | ||
735 | goto err; | ||
736 | } | ||
733 | 737 | ||
734 | { | 738 | { |
735 | BIGNUM local_p, local_q; | 739 | BIGNUM local_p, local_q; |