diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-06-13 22:34:30 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-06-14 09:44:37 -0400 |
commit | 48dd11a8c100988caf5c5a2fe5b66db6e86a83f4 (patch) | |
tree | b8e78517f898cff88a991721f435208ff80d0673 /crypto/rsa/rsa_x931g.c | |
parent | 8ab4fed9bdcc5b8498b3d59d2fa72dd045f63539 (diff) |
Fix possible crash in X931 code.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3675)
(cherry picked from commit 5419dadd4bd1f7abbfa23326ca766d2c143f257c)
Diffstat (limited to 'crypto/rsa/rsa_x931g.c')
-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 9dd993fbc0..877ee2219c 100644 --- a/crypto/rsa/rsa_x931g.c +++ b/crypto/rsa/rsa_x931g.c @@ -153,6 +153,8 @@ int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, BN_CTX_start(ctx); Xp = BN_CTX_get(ctx); Xq = BN_CTX_get(ctx); + if (Xq == NULL) + goto error; if (!BN_X931_generate_Xpq(Xp, Xq, bits, ctx)) goto error; |