mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 03:05:44 +01:00
Add an input check in psa_its_set
This commit is contained in:
parent
822b8f65bd
commit
dc22d8d022
@ -214,9 +214,12 @@ psa_status_t psa_its_set( psa_storage_uid_t uid,
|
|||||||
n = fwrite( &header, 1, sizeof( header ), stream );
|
n = fwrite( &header, 1, sizeof( header ), stream );
|
||||||
if( n != sizeof( header ) )
|
if( n != sizeof( header ) )
|
||||||
goto exit;
|
goto exit;
|
||||||
n = fwrite( p_data, 1, data_length, stream );
|
if( data_length != 0 )
|
||||||
if( n != data_length )
|
{
|
||||||
goto exit;
|
n = fwrite( p_data, 1, data_length, stream );
|
||||||
|
if( n != data_length )
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
status = PSA_SUCCESS;
|
status = PSA_SUCCESS;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
Loading…
Reference in New Issue
Block a user