diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-27 13:32:58 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-28 13:13:09 +0100 |
commit | f08e8034505ae69d6b986f20a63b705d1f012744 (patch) | |
tree | 98f4a35ef04ec4e12e7999000e122274514ab3eb /crypto/dsa | |
parent | 2280358146b620647c51a5b940dd9104c4ea3a3f (diff) | |
download | openssl-f08e8034505ae69d6b986f20a63b705d1f012744.tar.gz |
Check that we were actually allocated BIGNUMs in dsa_builtin_paramgen2
Calls to BN_CTX_get() can fail so we should check that they were
successful.
Reviewed-by: Richard Levitte <levitte@openssl.org>
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 c278d9853d..d97a06b456 100644 --- a/crypto/dsa/dsa_gen.c +++ b/crypto/dsa/dsa_gen.c @@ -406,6 +406,8 @@ int dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N, X = BN_CTX_get(ctx); c = BN_CTX_get(ctx); test = BN_CTX_get(ctx); + if (test == NULL) + goto err; /* if p, q already supplied generate g only */ if (ret->p && ret->q) { |