diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-06-13 21:22:45 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-06-14 09:51:10 -0400 |
commit | f3ce10ba15fc83603848354a3303e68b7ba18419 (patch) | |
tree | d8d66847ad9731aa471e0af951d294ffc71e9e50 /crypto/dsa | |
parent | ccefe0e3a5cb1c20a9c860116ad29547659afc13 (diff) |
Fix a possible crash in dsa_builtin_paramgen2.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3675)
(cherry picked from commit fb0a64126b8c11a6961dfa1323c3602b591af7df)
Diffstat (limited to 'crypto/dsa')
-rw-r--r-- | crypto/dsa/dsa_gen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c index 1fce0f81c2..21af2e159f 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -482,6 +482,8 @@ int dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N, } else { p = BN_CTX_get(ctx); q = BN_CTX_get(ctx); + if (q == NULL) + goto err; } if (!BN_lshift(test, BN_value_one(), L - 1)) |