mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Coverity 1516624: Fix overrun memory access.
Not possible to hit but good to address. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19576)
This commit is contained in:
parent
00e38edcfb
commit
ce0a7cadad
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user