projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f0b7df
)
Fix coverity issue: CID 1466483 - Improper use of Negative value in dh_ctrl.c
author
Shane Lontis
<shane.lontis@oracle.com>
Thu, 10 Sep 2020 08:19:13 +0000
(18:19 +1000)
committer
Shane Lontis
<shane.lontis@oracle.com>
Sat, 12 Sep 2020 05:57:24 +0000
(15:57 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12847)
crypto/dh/dh_ctrl.c
patch
|
blob
|
history
diff --git
a/crypto/dh/dh_ctrl.c
b/crypto/dh/dh_ctrl.c
index 6fddd271a889970a6ccab4d55f56e4cbec15c95e..0db5eba50523929831b23dcce62f1f3d65f88bfe 100644
(file)
--- 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;