File tree 1 file changed +4
-2
lines changed 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4907,7 +4907,8 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
4907
4907
{
4908
4908
TCB_t * pxTCB ;
4909
4909
4910
- if ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS )
4910
+ if ( ( xIndex >= 0 ) &&
4911
+ ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS ) )
4911
4912
{
4912
4913
pxTCB = prvGetTCBFromHandle ( xTaskToSet );
4913
4914
configASSERT ( pxTCB != NULL );
@@ -4926,7 +4927,8 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
4926
4927
void * pvReturn = NULL ;
4927
4928
TCB_t * pxTCB ;
4928
4929
4929
- if ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS )
4930
+ if ( ( xIndex >= 0 ) &&
4931
+ ( xIndex < configNUM_THREAD_LOCAL_STORAGE_POINTERS ) )
4930
4932
{
4931
4933
pxTCB = prvGetTCBFromHandle ( xTaskToQuery );
4932
4934
pvReturn = pxTCB -> pvThreadLocalStoragePointers [ xIndex ];
You can’t perform that action at this time.
0 commit comments