Skip to content

Commit

Permalink
Coverity 1516624: Fix overrun memory access.
Browse files Browse the repository at this point in the history
Not possible to hit but good to address.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #19576)

(cherry picked from commit ce0a7ca)
  • Loading branch information
paulidale authored and t8m committed Nov 3, 2022
1 parent f8e6dda commit de45fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/punycode_test.c
Expand Up @@ -154,7 +154,7 @@ static int test_punycode(int n)
if (!TEST_true(ossl_punycode_decode(tc->encoded, strlen(tc->encoded),
buffer, &bsize)))
return 0;
for (i = 0; i < sizeof(tc->raw); i++)
for (i = 0; i < OSSL_NELEM(tc->raw); i++)
if (tc->raw[i] == 0)
break;
if (!TEST_mem_eq(buffer, bsize * sizeof(*buffer),
Expand Down

0 comments on commit de45fec

Please sign in to comment.