Skip to content

Commit

Permalink
evp_test.c: There are now 3 parameters possible for digests
Browse files Browse the repository at this point in the history
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 #22521)
  • Loading branch information
t8m committed Oct 30, 2023
1 parent 758e9b5 commit 497a781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/evp_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 497a781

Please sign in to comment.