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:
388105f
)
Fix crash in ecdh_simple_compute_key.
author
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Tue, 13 Jun 2017 16:08:40 +0000
(18:08 +0200)
committer
Rich Salz
<rsalz@openssl.org>
Wed, 14 Jun 2017 13:51:32 +0000
(09:51 -0400)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3671)
(cherry picked from commit
abea494cf75061650deecf584adc2cd293ce322d
)
crypto/ec/ecdh_ossl.c
patch
|
blob
|
history
diff --git
a/crypto/ec/ecdh_ossl.c
b/crypto/ec/ecdh_ossl.c
index caf65de8c46e4f2733caff9ed94f9f6325d8e263..a865145974d14fc258a1380342c640568abbefa6 100644
(file)
--- a/
crypto/ec/ecdh_ossl.c
+++ b/
crypto/ec/ecdh_ossl.c
@@
-66,6
+66,10
@@
int ecdh_simple_compute_key(unsigned char **pout, size_t *poutlen,
BN_CTX_start(ctx);
x = BN_CTX_get(ctx);
y = BN_CTX_get(ctx);
+ if (y == NULL) {
+ ECerr(EC_F_ECDH_SIMPLE_COMPUTE_KEY, ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
priv_key = EC_KEY_get0_private_key(ecdh);
if (priv_key == NULL) {