1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Fix PSA AEAD GCM's update output buffer length verification.

Move GCM's update output buffer length verification
from PSA AEAD to the built-in implementation of the GCM.

Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
Mateusz Starzyk
2021-10-04 13:46:38 +02:00
parent f28261fc14
commit c48f43b44d
6 changed files with 37 additions and 4 deletions

View File

@ -431,7 +431,7 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
unsigned char ectr[16];
if( output_size < input_length )
return( MBEDTLS_ERR_GCM_BAD_INPUT );
return( MBEDTLS_ERR_GCM_BUFFER_TOO_SMALL );
GCM_VALIDATE_RET( output_length != NULL );
*output_length = input_length;