From d61effd38b518edd58c29144805cfff235c0d704 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 13 Jan 2022 17:22:06 -0800 Subject: [PATCH] Use G_ELI_IVKEYLEN as the size of IV in the user test code. IVs are not the size of keys as a general case. Most often they are the size of a single block. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33885 --- sys/geom/eli/g_eli_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli_crypto.c b/sys/geom/eli/g_eli_crypto.c index ca8170db7e4d..441bedb030b8 100644 --- a/sys/geom/eli/g_eli_crypto.c +++ b/sys/geom/eli/g_eli_crypto.c @@ -112,7 +112,7 @@ g_eli_crypto_cipher(u_int algo, int enc, u_char *data, size_t datasize, { EVP_CIPHER_CTX *ctx; const EVP_CIPHER *type; - u_char iv[keysize]; + u_char iv[G_ELI_IVKEYLEN]; int outsize; assert(algo != CRYPTO_AES_XTS);