diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-06-13 22:08:03 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-06-14 09:50:35 -0400 |
commit | ded1b50f83c4d0d3e12a2a64d3bd66a27884136e (patch) | |
tree | 1dba4c0342b1186a94dde1ae5ada2344b08a0067 /crypto/rsa/rsa_ossl.c | |
parent | 48dd11a8c100988caf5c5a2fe5b66db6e86a83f4 (diff) |
Fix another possible crash in rsa_ossl_mod_exp.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3675)
(cherry picked from commit 5625567f9c7daaa2e2689647e10e4c5d7370718f)
Diffstat (limited to 'crypto/rsa/rsa_ossl.c')
-rw-r--r-- | crypto/rsa/rsa_ossl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_ossl.c b/crypto/rsa/rsa_ossl.c index 793e2f9c87..62a88959fa 100644 --- a/crypto/rsa/rsa_ossl.c +++ b/crypto/rsa/rsa_ossl.c @@ -603,6 +603,8 @@ static int rsa_ossl_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx) r1 = BN_CTX_get(ctx); m1 = BN_CTX_get(ctx); vrfy = BN_CTX_get(ctx); + if (vrfy == NULL) + goto err; { BIGNUM *p = BN_new(), *q = BN_new(); |