From d87d87371f4e3d51be50313a4c2ec26a38ba6d21 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 13 Sep 2021 12:20:51 +0200 Subject: [PATCH] Fix the size in bytes Signed-off-by: Gilles Peskine --- library/psa_crypto_cipher.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/psa_crypto_cipher.c b/library/psa_crypto_cipher.c index 5c78c2311..2268fc585 100644 --- a/library/psa_crypto_cipher.c +++ b/library/psa_crypto_cipher.c @@ -268,11 +268,11 @@ static psa_status_t cipher_set_iv( mbedtls_psa_cipher_operation_t *operation, * This does not need to be aligned to a block boundary. * If there is a partial block at the end of the input, * it is stored in \p ctx for future processing. - * \param output The buffer where the output is written. Its size - * must be at least `floor((p + input_length) / BS)` - * where `p` is the number of bytes in the unprocessed - * partial block in \p ctx (`0 <= p <= BS - 1`) and - * `BS` is the block size. + * \param output The buffer where the output is written. It must be + * at least `BS * floor((p + input_length) / BS)` bytes + * long, where `p` is the number of bytes in the + * unprocessed partial block in \p ctx (with + * `0 <= p <= BS - 1`) and `BS` is the block size. * \param output_length On success, the number of bytes written to \p output. * \c 0 on error. *