This is an automated email from Gerrit. Sebastiaan de Schaetzen ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/6428
-- gerrit commit 2f2e279ec8457db7223db30f3e2d73e7c8318ce5 Author: Sebastiaan de Schaetzen <[email protected]> Date: Wed Aug 11 14:51:29 2021 +0200 rtos/riot: fix out-of-bounds read of optional symbols array Change-Id: I172ae182dd0c7dd68edaa66ac030030d9bc65401 Signed-off-by: Sebastiaan de Schaetzen <[email protected]> diff --git a/src/rtos/riot.c b/src/rtos/riot.c index fb5d1b2..905b3d6 100644 --- a/src/rtos/riot.c +++ b/src/rtos/riot.c @@ -374,7 +374,7 @@ static int riot_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[ (*symbol_list)[i].optional = false; /* Lookup if symbol is optional */ - for (unsigned int k = 0; k < sizeof(riot_optional_symbols); k++) { + for (unsigned int k = 0; k < ARRAY_SIZE(riot_optional_symbols); k++) { if (i == riot_optional_symbols[k]) { (*symbol_list)[i].optional = true; break; --
