Fix AEAD multipart incorrect offset in test_suite_psa_crypto.function
When working with block cipher modes like GCM(PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER), aead_multipart_internal_func() should calculate the offset in output buffer based on output_length, not using the offset of the input buffer(part_offset). Signed-off-by: Mircea Udrea <mircea.udrea@silexinsight.com>
This commit is contained in:
parent
a9f32fbb21
commit
657ff4fd09
1 changed files with 1 additions and 1 deletions
|
@ -506,7 +506,7 @@ static int aead_multipart_internal_func( int key_type_arg, data_t *key_data,
|
||||||
|
|
||||||
if( output_data && output_part_length )
|
if( output_data && output_part_length )
|
||||||
{
|
{
|
||||||
memcpy( ( output_data + part_offset ), part_data,
|
memcpy( ( output_data + output_length ), part_data,
|
||||||
output_part_length );
|
output_part_length );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue