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:
4162c7d
)
Check for malloc error in bn_x931p.c
author
Matt Caswell
<matt@openssl.org>
Mon, 22 Aug 2016 22:34:30 +0000
(23:34 +0100)
committer
Matt Caswell
<matt@openssl.org>
Mon, 22 Aug 2016 23:19:15 +0000
(
00:19
+0100)
Ensure BN_CTX_get() has been successful
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/bn/bn_x931p.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_x931p.c
b/crypto/bn/bn_x931p.c
index 516ad34ca7e52d91bfa917aba8d1dc12e4c97f6b..40734cb2f69f09a657a775ae080ca3e3fa5fe576 100644
(file)
--- a/
crypto/bn/bn_x931p.c
+++ b/
crypto/bn/bn_x931p.c
@@
-74,6
+74,9
@@
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
pm1 = BN_CTX_get(ctx);
+ if (pm1 == NULL)
+ goto err;
+
if (!bn_x931_derive_pi(p1, Xp1, ctx, cb))
goto err;