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:35:48 -0400 |
commit | 5625567f9c7daaa2e2689647e10e4c5d7370718f (patch) | |
tree | 6936318f36d5ecdb1d650f02b1b5b96ffa36ed21 /crypto/rsa | |
parent | fb0a64126b8c11a6961dfa1323c3602b591af7df (diff) | |
download | openssl-5625567f9c7daaa2e2689647e10e4c5d7370718f.zip openssl-5625567f9c7daaa2e2689647e10e4c5d7370718f.tar.gz openssl-5625567f9c7daaa2e2689647e10e4c5d7370718f.tar.bz2 |
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)
Diffstat (limited to 'crypto/rsa')
-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 5e0ad92..92c4be1 100644 --- a/crypto/rsa/rsa_ossl.c +++ b/crypto/rsa/rsa_ossl.c @@ -608,6 +608,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(); |