diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2020-09-10 10:19:13 +0200 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-09-12 07:57:24 +0200 |
commit | 9951eaf467f8cc43ffad69222b42340c3b24cd52 (patch) | |
tree | c2e163031822e0cbec24e22b503b8699cf8ae8cc /crypto/dh | |
parent | Fix coverity issue: CID 1466484 - Remove dead code in PKCS7_dataInit() (diff) | |
download | openssl-9951eaf467f8cc43ffad69222b42340c3b24cd52.tar.xz openssl-9951eaf467f8cc43ffad69222b42340c3b24cd52.zip |
Fix coverity issue: CID 1466483 - Improper use of Negative value in dh_ctrl.c
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12847)
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; |