mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-11 00:44:31 +00:00
Add comment on exiting early from mbedtls_gcm_update().
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
parent
b45b57eec6
commit
3443bd2570
@ -454,7 +454,9 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
|
|||||||
*output_length = input_length;
|
*output_length = input_length;
|
||||||
|
|
||||||
/* Exit early if input_length==0 so that we don't do any pointer arithmetic
|
/* Exit early if input_length==0 so that we don't do any pointer arithmetic
|
||||||
* on a potentially null pointer. */
|
* on a potentially null pointer.
|
||||||
|
* Returning early also means that the last partial block of AD remains
|
||||||
|
* untouched for mbedtls_gcm_finish */
|
||||||
if( input_length == 0 )
|
if( input_length == 0 )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user