diff options
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh_ctrl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/dh/dh_ctrl.c b/crypto/dh/dh_ctrl.c index 6fddd271a8..0db5eba505 100644 --- a/crypto/dh/dh_ctrl.c +++ b/crypto/dh/dh_ctrl.c @@ -500,6 +500,9 @@ int EVP_PKEY_CTX_set0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, int len) int ret; OSSL_PARAM params[2], *p = params; + if (len <= 0) + return -1; + ret = dh_param_derive_check(ctx); if (ret != 1) return ret; |