mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-28 08:37:25 +00:00
Add buffer overflow check
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
This commit is contained in:
parent
3f860e4c18
commit
58c1727775
@ -390,6 +390,9 @@ static psa_status_t cipher_update( mbedtls_psa_cipher_operation_t *operation,
|
||||
status = mbedtls_to_psa_error(
|
||||
mbedtls_cipher_update( &operation->ctx.cipher, input,
|
||||
input_length, output, output_length ) );
|
||||
|
||||
if( *output_length > output_size )
|
||||
return PSA_ERROR_CORRUPTION_DETECTED;
|
||||
}
|
||||
|
||||
return( status );
|
||||
|
Loading…
x
Reference in New Issue
Block a user