diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-13 13:39:08 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-01-13 13:39:08 +0100 |
commit | 00abb1f201cbe1e40c2eef30819be115d3d04d10 (patch) | |
tree | 7eb36871dd7af02db7d2f59482644a56bc79d7bb /thirdparty/openssl/crypto/ecdh | |
parent | de0b31edd5b36b8c8016b7ca50c1823f2efbfa74 (diff) |
openssl: Update to pristine 1.0.2n (security update)
Diffstat (limited to 'thirdparty/openssl/crypto/ecdh')
-rw-r--r-- | thirdparty/openssl/crypto/ecdh/ech_lib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/thirdparty/openssl/crypto/ecdh/ech_lib.c b/thirdparty/openssl/crypto/ecdh/ech_lib.c index cbc21d1a27..9cc22582e4 100644 --- a/thirdparty/openssl/crypto/ecdh/ech_lib.c +++ b/thirdparty/openssl/crypto/ecdh/ech_lib.c @@ -225,9 +225,16 @@ ECDH_DATA *ecdh_check(EC_KEY *key) */ ecdh_data_free(ecdh_data); ecdh_data = (ECDH_DATA *)data; + } else if (EC_KEY_get_key_method_data(key, ecdh_data_dup, + ecdh_data_free, + ecdh_data_free) != ecdh_data) { + /* Or an out of memory error in EC_KEY_insert_key_method_data. */ + ecdh_data_free(ecdh_data); + return NULL; } - } else + } else { ecdh_data = (ECDH_DATA *)data; + } #ifdef OPENSSL_FIPS if (FIPS_mode() && !(ecdh_data->flags & ECDH_FLAG_FIPS_METHOD) && !(EC_KEY_get_flags(key) & EC_FLAG_NON_FIPS_ALLOW)) { |