[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Wed Jun 14 13:04:01 UTC 2017
The branch master has been updated
via abea494cf75061650deecf584adc2cd293ce322d (commit)
from 4fc426b78964b3d234cb7b1b6112c9b80e16a13a (commit)
- Log -----------------------------------------------------------------
commit abea494cf75061650deecf584adc2cd293ce322d
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Tue Jun 13 18:08:40 2017 +0200
Fix crash in ecdh_simple_compute_key.
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3671)
-----------------------------------------------------------------------
Summary of changes:
crypto/ec/ecdh_ossl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/crypto/ec/ecdh_ossl.c b/crypto/ec/ecdh_ossl.c
index caf65de..a865145 100644
--- 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) {
More information about the openssl-commits
mailing list