From: Tomas Mraz Date: Thu, 26 Oct 2023 07:59:22 +0000 (+0200) Subject: evp_test.c: There are now 3 parameters possible for digests X-Git-Tag: openssl-3.3.0-alpha1~713 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=497a7810bcee48781aa12d4db870f6a565bd0592;p=thirdparty%2Fopenssl.git 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 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/22521) --- diff --git a/test/evp_test.c b/test/evp_test.c index 487d6a1ad2e..d74da09616c 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 = ¶ms[0]; + OSSL_PARAM params[4], *p = ¶ms[0]; t->err = "TEST_FAILURE"; if (!TEST_ptr(mctx = EVP_MD_CTX_new()))