mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 00:57:44 -04:00
Added protection for xQueueGenericCreate
This commit is contained in:
parent
359b10a4ea
commit
0c9b3fc8b7
1 changed files with 3 additions and 0 deletions
3
queue.c
3
queue.c
|
@ -378,6 +378,9 @@ Queue_t * const pxQueue = xQueue;
|
|||
zero in the case the queue is used as a semaphore. */
|
||||
xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
|
||||
|
||||
/* Check for multiplication overflow */
|
||||
configASSERT( uxItemSize == 0 || uxQueueLength == xQueueSizeInBytes / uxItemSize );
|
||||
|
||||
/* Allocate the queue and storage area. Justification for MISRA
|
||||
deviation as follows: pvPortMalloc() always ensures returned memory
|
||||
blocks are aligned per the requirements of the MCU stack. In this case
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue