mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Validate tag pointer in ccm function.
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
@ -478,7 +478,8 @@ int mbedtls_ccm_finish( mbedtls_ccm_context *ctx,
|
||||
ret = mbedtls_ccm_crypt( ctx, 0, 16, ctx->y, ctx->y );
|
||||
if( ret != 0 )
|
||||
return ret;
|
||||
memcpy( tag, ctx->y, tag_len );
|
||||
if( tag != NULL )
|
||||
memcpy( tag, ctx->y, tag_len );
|
||||
mbedtls_ccm_clear_state(ctx);
|
||||
|
||||
return( 0 );
|
||||
|
Reference in New Issue
Block a user