mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-24 12:03:28 +01:00
Windows: fix error caused by requesting large number of random bytes when writing randomly generated data to unused/reserved header areas.
This commit is contained in:
parent
1506916487
commit
5d5a645083
@ -1302,7 +1302,7 @@ int WriteRandomDataToReservedHeaderAreas (HWND hwndDlg, HANDLE dev, CRYPTO_INFO
|
||||
{
|
||||
// encrypt random data instead of existing data for better entropy, except in case of primary
|
||||
// header of an in-place encrypted disk
|
||||
RandgetBytes (hwndDlg, buf + TC_VOLUME_HEADER_EFFECTIVE_SIZE, sizeof (buf) - TC_VOLUME_HEADER_EFFECTIVE_SIZE, FALSE);
|
||||
RandgetBytesFull (hwndDlg, buf + TC_VOLUME_HEADER_EFFECTIVE_SIZE, sizeof (buf) - TC_VOLUME_HEADER_EFFECTIVE_SIZE, FALSE, TRUE);
|
||||
}
|
||||
|
||||
EncryptBuffer (buf + TC_VOLUME_HEADER_EFFECTIVE_SIZE, sizeof (buf) - TC_VOLUME_HEADER_EFFECTIVE_SIZE, cryptoInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user