projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2280358
)
Check that we were actually allocated BIGNUMs in dsa_builtin_paramgen2
author
Matt Caswell
<matt@openssl.org>
Wed, 27 Apr 2016 12:32:58 +0000
(13:32 +0100)
committer
Matt Caswell
<matt@openssl.org>
Thu, 28 Apr 2016 12:13:09 +0000
(13:13 +0100)
Calls to BN_CTX_get() can fail so we should check that they were
successful.
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/dsa/dsa_gen.c
patch
|
blob
|
history
diff --git
a/crypto/dsa/dsa_gen.c
b/crypto/dsa/dsa_gen.c
index c278d9853de6d81731322c091a28d387ba9a3989..d97a06b4569c6dff14b6f1a62325181e48fb9468 100644
(file)
--- 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) {