summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2023-10-26 09:59:22 +0200
committerTomas Mraz <tomas@openssl.org>2023-10-30 11:00:54 +0100
commitf205958d9f9a2ead9edc088b0d3f060ee7c5b8c4 (patch)
treeea509ea9666ff0058f832697a0fe4b311f5ba93f /test
parente401723baf89b1f201a59fdd679f7ae6b5c123a2 (diff)
evp_test.c: There are now 3 parameters possible for digests
In digest_test_run() there are now 3 parameters possible plus the sentinel value. In reality we will never use all three at once but Coverity rightfully complains that it is possible to overflow the params array. Fixes Coverity 1548054 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22521) (cherry picked from commit 497a7810bcee48781aa12d4db870f6a565bd0592)
Diffstat (limited to 'test')
-rw-r--r--test/evp_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index 487d6a1ad2..d74da09616 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -458,7 +458,7 @@ static int digest_test_run(EVP_TEST *t)
unsigned int got_len;
size_t size = 0;
int xof = 0;
- OSSL_PARAM params[3], *p = &params[0];
+ OSSL_PARAM params[4], *p = &params[0];
t->err = "TEST_FAILURE";
if (!TEST_ptr(mctx = EVP_MD_CTX_new()))