mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-24 06:02:44 +00:00
Fix error path in psa_key_derivation_output_bytes
Co-authored-by: David Horstmann <david.horstmann@arm.com> Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
parent
eb8c665a53
commit
ee5920a7d5
@ -5881,8 +5881,10 @@ exit:
|
|||||||
psa_algorithm_t alg = operation->alg;
|
psa_algorithm_t alg = operation->alg;
|
||||||
psa_key_derivation_abort(operation);
|
psa_key_derivation_abort(operation);
|
||||||
operation->alg = alg;
|
operation->alg = alg;
|
||||||
|
if (output != NULL) {
|
||||||
memset(output, '!', output_length);
|
memset(output, '!', output_length);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOCAL_OUTPUT_FREE(output_external, output);
|
LOCAL_OUTPUT_FREE(output_external, output);
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user