mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix buffer overflow in ipc.c
This commit is contained in:
parent
067c0e1ffe
commit
768bbcd8aa
@ -77,10 +77,11 @@ void esp_ipc_init()
|
||||
{
|
||||
s_ipc_mutex = xSemaphoreCreateMutex();
|
||||
s_ipc_ack = xSemaphoreCreateBinary();
|
||||
const char* task_names[2] = {"ipc0", "ipc1"};
|
||||
char task_name[8];
|
||||
for (int i = 0; i < portNUM_PROCESSORS; ++i) {
|
||||
sprintf(task_name,"ipc%d",i);
|
||||
s_ipc_sem[i] = xSemaphoreCreateBinary();
|
||||
portBASE_TYPE res = xTaskCreatePinnedToCore(ipc_task, task_names[i], CONFIG_IPC_TASK_STACK_SIZE, (void*) i,
|
||||
portBASE_TYPE res = xTaskCreatePinnedToCore(ipc_task, task_name, CONFIG_IPC_TASK_STACK_SIZE, (void*) i,
|
||||
configMAX_PRIORITIES - 1, &s_ipc_tasks[i], i);
|
||||
assert(res == pdTRUE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user