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:
Mircea Udrea 2022-01-31 13:51:56 +01:00
parent a9f32fbb21
commit 657ff4fd09

View file

@ -506,7 +506,7 @@ static int aead_multipart_internal_func( int key_type_arg, data_t *key_data,
if( output_data && output_part_length )
{
memcpy( ( output_data + part_offset ), part_data,
memcpy( ( output_data + output_length ), part_data,
output_part_length );
}