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:
Ryan Everett 2024-02-09 15:09:28 +00:00 committed by GitHub
parent eb8c665a53
commit ee5920a7d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5881,7 +5881,9 @@ exit:
psa_algorithm_t alg = operation->alg;
psa_key_derivation_abort(operation);
operation->alg = alg;
memset(output, '!', output_length);
if (output != NULL) {
memset(output, '!', output_length);
}
}
LOCAL_OUTPUT_FREE(output_external, output);