mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-20 22:05:15 +00:00
Validate tag pointer in ccm function.
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
parent
1bda9451ef
commit
c8bdf36a72
2 changed files with 3 additions and 5 deletions
|
|
@ -48,10 +48,7 @@ static int check_multipart( mbedtls_ccm_context *ctx,
|
|||
mbedtls_free( output );
|
||||
output = NULL;
|
||||
|
||||
if( tag->len == 0 )
|
||||
ASSERT_ALLOC( output, 16 );
|
||||
else
|
||||
ASSERT_ALLOC( output, tag->len );
|
||||
ASSERT_ALLOC( output, tag->len );
|
||||
TEST_EQUAL( 0, mbedtls_ccm_finish( ctx, output, tag->len ) );
|
||||
ASSERT_COMPARE( output, tag->len, tag->x, tag->len );
|
||||
mbedtls_free( output );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue