diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-07-02 22:36:33 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2023-07-02 22:36:33 +0200 |
commit | 0e49b7bc33b0eb2c07956ec14bbde6f9b31c8ccd (patch) | |
tree | 0f0b0b2e0ff9ac4067ed5eb6095b0c73c40e1658 /src/Common | |
parent | 3b80c8416bcfe7462c0fc4798f0c67c100098bac (diff) | |
download | VeraCrypt-0e49b7bc33b0eb2c07956ec14bbde6f9b31c8ccd.tar.gz VeraCrypt-0e49b7bc33b0eb2c07956ec14bbde6f9b31c8ccd.zip |
Windows: Fix regression when creating multiple keyfiles with a fixed size
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/Dlgcode.c | 5 |
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); |