mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
fix possible NULL pointer dereference after call to configASSERT()
Compiling with clang static code analysis, possible NULL pointer dereference are found. Since configASSERT() can possibly return and continue "normal" operation, the code in queue.c and stream_buffer.c can be adjusted to avoid NULL pointer exceptions. Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
This commit is contained in:
parent
0ae0715ac9
commit
80f164cebb
2 changed files with 10 additions and 19 deletions
|
@ -1653,11 +1653,9 @@ void vStreamBufferSetStreamBufferNotificationIndex( StreamBufferHandle_t xStream
|
|||
|
||||
traceENTER_vStreamBufferSetStreamBufferNotificationIndex( xStreamBuffer, uxNotificationIndex );
|
||||
|
||||
configASSERT( pxStreamBuffer );
|
||||
|
||||
/* There should be no task waiting otherwise we'd never resume them. */
|
||||
configASSERT( pxStreamBuffer->xTaskWaitingToReceive == NULL );
|
||||
configASSERT( pxStreamBuffer->xTaskWaitingToSend == NULL );
|
||||
configASSERT( ( pxStreamBuffer != NULL ) && ( pxStreamBuffer->xTaskWaitingToReceive == NULL ) );
|
||||
configASSERT( ( pxStreamBuffer != NULL ) && ( pxStreamBuffer->xTaskWaitingToSend == NULL ) );
|
||||
|
||||
/* Check that the task notification index is valid. */
|
||||
configASSERT( uxNotificationIndex < configTASK_NOTIFICATION_ARRAY_ENTRIES );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue