We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d05b9c1 commit 4733839Copy full SHA for 4733839
queue.c
@@ -397,6 +397,9 @@ BaseType_t xQueueGenericReset( QueueHandle_t xQueue,
397
/* Check for multiplication overflow. */
398
configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) );
399
400
+ /* Check for addition overflow. */
401
+ configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes );
402
+
403
/* Allocate the queue and storage area. Justification for MISRA
404
* deviation as follows: pvPortMalloc() always ensures returned memory
405
* blocks are aligned per the requirements of the MCU stack. In this case
0 commit comments