mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-16 17:43:14 +00:00
Add buffer copying to psa_aead_update_ad()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
fed23777f3
commit
25dac6edc1
@ -5058,11 +5058,14 @@ exit:
|
||||
|
||||
/* Pass additional data to an active multipart AEAD operation. */
|
||||
psa_status_t psa_aead_update_ad(psa_aead_operation_t *operation,
|
||||
const uint8_t *input,
|
||||
const uint8_t *input_external,
|
||||
size_t input_length)
|
||||
{
|
||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||
|
||||
LOCAL_INPUT_DECLARE(input_external, input);
|
||||
LOCAL_INPUT_ALLOC(input_external, input_length, input);
|
||||
|
||||
if (operation->id == 0) {
|
||||
status = PSA_ERROR_BAD_STATE;
|
||||
goto exit;
|
||||
@ -5098,6 +5101,8 @@ exit:
|
||||
psa_aead_abort(operation);
|
||||
}
|
||||
|
||||
LOCAL_INPUT_FREE(input_external, input);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user