mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-02-03 07:39:02 +01:00
Add assert to check for overflow in xStreamBufferSendFromISR. (#1357)
Co-authored-by: czjaso <czjaso@amazon.com>
This commit is contained in:
parent
8a416d79c0
commit
5282247346
@ -961,6 +961,9 @@ size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
|
|||||||
if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) != ( uint8_t ) 0 )
|
if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) != ( uint8_t ) 0 )
|
||||||
{
|
{
|
||||||
xRequiredSpace += sbBYTES_TO_STORE_MESSAGE_LENGTH;
|
xRequiredSpace += sbBYTES_TO_STORE_MESSAGE_LENGTH;
|
||||||
|
|
||||||
|
/* Overflow? */
|
||||||
|
configASSERT( xRequiredSpace > xDataLengthBytes );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user