global: fix some potential out-of-bounds issue

...that found by Coverity Scan
This commit is contained in:
morris
2022-04-07 19:14:37 +08:00
parent bb2a57dc71
commit 483149e41b
3 changed files with 4 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ static void esp_ipc_init(void) __attribute__((constructor));
static void esp_ipc_init(void)
{
char task_name[15];
char task_name[configMAX_TASK_NAME_LEN];
for (int i = 0; i < portNUM_PROCESSORS; ++i) {
snprintf(task_name, sizeof(task_name), "ipc%d", i);