commit | f08a550e688b444f53e9d254671a113c06c50e1d | [log] [tgz] |
---|---|---|
author | mohammad1603 <mohammad.abomokh@arm.com> | Sun Jun 03 15:05:47 2018 +0300 |
committer | itayzafrir <itay.zafrir@arm.com> | Wed Sep 05 12:41:51 2018 +0300 |
tree | 185b6ef7355cc3f6c1beb7e1019ec3f2b4b23f3b | |
parent | f4f0d612ba80e44cb5e6491b932b9d29d15c8b07 [diff] [blame] |
set output length to zero to cover output length in error case
diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 6c43158..1123a78 100755 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c
@@ -1491,6 +1491,7 @@ size_t key_bits; unsigned char tag[16]; mbedtls_cipher_id_t cipher_id; + *ciphertext_length = 0; if( ciphertext_size < ( plaintext_length + sizeof( tag ) ) ) return( PSA_ERROR_INVALID_ARGUMENT );