From ae1bae841213ecdfb577cbdcf496e7fa880039c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 8 Feb 2022 11:36:28 +0100 Subject: [PATCH] Give a magic constant a name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- programs/cipher/cipher_aead_demo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/cipher/cipher_aead_demo.c b/programs/cipher/cipher_aead_demo.c index 366b9a3ec3..18bd66c812 100644 --- a/programs/cipher/cipher_aead_demo.c +++ b/programs/cipher/cipher_aead_demo.c @@ -192,7 +192,8 @@ static int aead_encrypt( mbedtls_cipher_context_t *ctx, size_t tag_len, { int ret; size_t olen; - unsigned char out[MSG_MAX_SIZE + 16]; +#define MAX_TAG_LENGTH 16 + unsigned char out[MSG_MAX_SIZE + MAX_TAG_LENGTH]; unsigned char *p = out; CHK( mbedtls_cipher_set_iv( ctx, iv, iv_len ) );