From 969e67e7435cd86ae19b0077ecfbd9962cbd15a3 Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Thu, 25 May 2023 14:12:45 +0200 Subject: [PATCH] Use defined constant for cipher_spec buffer size. --- lib/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setup.c b/lib/setup.c index 11f3cb13..ce9c162b 100644 --- a/lib/setup.c +++ b/lib/setup.c @@ -1822,7 +1822,7 @@ static int _crypt_format_luks2(struct crypt_device *cd, unsigned long required_alignment = DEFAULT_DISK_ALIGNMENT; unsigned long alignment_offset = 0; unsigned int sector_size; - char cipher_spec[128]; + char cipher_spec[2*MAX_CAPI_ONE_LEN]; const char *integrity = params ? params->integrity : NULL; uint64_t data_offset_bytes, dev_size, metadata_size_bytes, keyslots_size_bytes; uint32_t dmc_flags;