From ee2ee4dc7ce9a0ff4a44d37768a1a88db7778de9 Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 3 Mar 2025 08:43:10 +0100 Subject: [PATCH] Fix add overflow check on recursive mutex counter --- queue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/queue.c b/queue.c index e91d9e39b..5f17d440d 100644 --- a/queue.c +++ b/queue.c @@ -833,6 +833,10 @@ static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() ) { ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; + + /* check if an overflow occurred */ + configASSERT( pxMutex->u.xSemaphore.uxRecursiveCallCount ); + xReturn = pdPASS; } else