diff options
author | Mansour Ahmadi <m.ahmadi@northeastern.edu> | 2018-12-11 15:48:08 -0500 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-12-13 09:54:54 +0000 |
commit | 55833a8de70589a5000044b6291e190f5a3826ae (patch) | |
tree | 400204cf760a8a22062a57bcbd642aa9c2f5fc23 /crypto/rsa | |
parent | 4fea7005c3d08ed0d575bdea5082b7b0ce355237 (diff) | |
download | openssl-55833a8de70589a5000044b6291e190f5a3826ae.zip openssl-55833a8de70589a5000044b6291e190f5a3826ae.tar.gz openssl-55833a8de70589a5000044b6291e190f5a3826ae.tar.bz2 |
add missing check for BN_mod_inverse
Fixes #7650
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7876)
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_x931g.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_x931g.c b/crypto/rsa/rsa_x931g.c index bc03875..1601777 100644 --- a/crypto/rsa/rsa_x931g.c +++ b/crypto/rsa/rsa_x931g.c @@ -128,6 +128,8 @@ int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, /* calculate inverse of q mod p */ rsa->iqmp = BN_mod_inverse(NULL, rsa->q, rsa->p, ctx2); + if (rsa->iqmp == NULL) + goto err; ret = 1; err: |