aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2017-06-13 21:22:45 +0200
committerRich Salz <rsalz@openssl.org>2017-06-14 09:35:48 -0400
commitfb0a64126b8c11a6961dfa1323c3602b591af7df (patch)
tree24398a6de0e7633f0c561eed457e85d38aabef57
parentabea494cf75061650deecf584adc2cd293ce322d (diff)
downloadopenssl-fb0a64126b8c11a6961dfa1323c3602b591af7df.tar.gz
Fix a possible crash in dsa_builtin_paramgen2.
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3675)
-rw-r--r--crypto/dsa/dsa_gen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/dsa/dsa_gen.c b/crypto/dsa/dsa_gen.c
index 3efeab84fa..e58ad8d70d 100644
--- a/crypto/dsa/dsa_gen.c
+++ b/crypto/dsa/dsa_gen.c
@@ -376,6 +376,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))