VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2023-07-02 22:36:33 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2023-07-02 22:36:33 +0200
commit0e49b7bc33b0eb2c07956ec14bbde6f9b31c8ccd (patch)
tree0f0b0b2e0ff9ac4067ed5eb6095b0c73c40e1658
parent3b80c8416bcfe7462c0fc4798f0c67c100098bac (diff)
downloadVeraCrypt-0e49b7bc33b0eb2c07956ec14bbde6f9b31c8ccd.tar.gz
VeraCrypt-0e49b7bc33b0eb2c07956ec14bbde6f9b31c8ccd.zip
Windows: Fix regression when creating multiple keyfiles with a fixed size
-rw-r--r--src/Common/Dlgcode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 0c0cff03..1717c7db 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -7366,8 +7366,6 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) GetDlgItem (hwndDlg, IDC_KEYFILES_SIZE), TRUE);
return 1;
}
-
- remainingBytes = keyfilesSize;
}
if (!GetWindowText(GetDlgItem (hwndDlg, IDC_KEYFILES_BASE_NAME), szFileBaseName, TC_MAX_PATH))
@@ -7468,9 +7466,10 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
keyfilesSize %= ((KEYFILE_MAX_READ_LEN - 64) + 1);
keyfilesSize += 64;
- remainingBytes = keyfilesSize;
}
+ remainingBytes = keyfilesSize;
+
do {
rndBytesLength = (int) min (remainingBytes, (unsigned long long) KEYFILE_MAX_READ_LEN);