From ad11a3f81c0595dc3c075266169b1088ce5d5cf3 Mon Sep 17 00:00:00 2001 From: Bernard Ladenthin Date: Sat, 1 Aug 2026 18:00:16 +0200 Subject: [PATCH] Common: make derived key buffer alignment explicit in CreateVolumeHeaderInMemory ReadVolumeHeaderWithAbort declares its derived key buffer with TC_DERIVED_KEY_BUFFER_ALIGNMENT, the equivalent buffer in CreateVolumeHeaderInMemory did not. The buffer already ends up 16-byte aligned because the KEY_INFO object above it raises the section alignment, so this changes no generated code - it only removes the dependence on that coincidence. --- src/Common/Volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c index 2f4c3f7929..9ff221c7e0 100644 --- a/src/Common/Volumes.c +++ b/src/Common/Volumes.c @@ -1022,7 +1022,7 @@ int CreateVolumeHeaderInMemory (HWND hwndDlg, BOOL bBoot, unsigned char *header, int nUserKeyLen = password? password->Length : 0; PCRYPTO_INFO cryptoInfo = crypto_open (); - static char dk[MASTER_KEYDATA_SIZE]; + static CRYPTOPP_ALIGN_DATA(TC_DERIVED_KEY_BUFFER_ALIGNMENT) char dk[MASTER_KEYDATA_SIZE]; int x; int retVal = 0; int primaryKeyOffset;