diff options
Diffstat (limited to 'thirdparty/openssl/crypto/dh')
-rw-r--r-- | thirdparty/openssl/crypto/dh/dh_ameth.c | 2 | ||||
-rw-r--r-- | thirdparty/openssl/crypto/dh/dh_key.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/thirdparty/openssl/crypto/dh/dh_ameth.c b/thirdparty/openssl/crypto/dh/dh_ameth.c index ac72468bd1..4558283576 100644 --- a/thirdparty/openssl/crypto/dh/dh_ameth.c +++ b/thirdparty/openssl/crypto/dh/dh_ameth.c @@ -519,7 +519,7 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) static int dh_missing_parameters(const EVP_PKEY *a) { - if (!a->pkey.dh->p || !a->pkey.dh->g) + if (a->pkey.dh == NULL || a->pkey.dh->p == NULL || a->pkey.dh->g == NULL) return 1; return 0; } diff --git a/thirdparty/openssl/crypto/dh/dh_key.c b/thirdparty/openssl/crypto/dh/dh_key.c index 1d80fb2c5f..387558f146 100644 --- a/thirdparty/openssl/crypto/dh/dh_key.c +++ b/thirdparty/openssl/crypto/dh/dh_key.c @@ -223,6 +223,8 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) goto err; BN_CTX_start(ctx); tmp = BN_CTX_get(ctx); + if (tmp == NULL) + goto err; if (dh->priv_key == NULL) { DHerr(DH_F_COMPUTE_KEY, DH_R_NO_PRIVATE_VALUE); |