File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3592,7 +3592,8 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
3592
3592
{
3593
3593
TCB_t * pxTCB ;
3594
3594
3595
- if ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS )
3595
+ if ( ( xIndex >= 0 ) &&
3596
+ ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS ) )
3596
3597
{
3597
3598
pxTCB = prvGetTCBFromHandle ( xTaskToSet );
3598
3599
configASSERT ( pxTCB != NULL );
@@ -3611,7 +3612,8 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
3611
3612
void * pvReturn = NULL ;
3612
3613
TCB_t * pxTCB ;
3613
3614
3614
- if ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS )
3615
+ if ( ( xIndex >= 0 ) &&
3616
+ ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS ) )
3615
3617
{
3616
3618
pxTCB = prvGetTCBFromHandle ( xTaskToQuery );
3617
3619
pvReturn = pxTCB -> pvThreadLocalStoragePointers [ xIndex ];
You can’t perform that action at this time.
0 commit comments