Merge branch 'fix/freertos_task_c_add_coverity_fix' into 'master'

fix(freertos): Fixed an issue where accessing task lists could overrun memory

Closes IDF-9412

See merge request espressif/esp-idf!29746
This commit is contained in:
Sudeep Mohanty 2024-03-20 15:54:39 +08:00
commit 4f3cd0deb9

View File

@ -917,7 +917,7 @@ static List_t * pxGetTaskListByIndex( UBaseType_t uxListIndex )
{
pxTaskList = &pxReadyTasksLists[ configMAX_PRIORITIES - 1 - uxListIndex ];
}
else if( uxListIndex < configMAX_PRIORITIES + xNonReadyTaskListsCnt + 1 )
else if( uxListIndex < configMAX_PRIORITIES + xNonReadyTaskListsCnt )
{
pxTaskList = non_ready_task_lists[ uxListIndex - configMAX_PRIORITIES ];
}