VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-15 12:17:59 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-15 12:19:11 (GMT)
commit5d5a645083c8eb885b0820361e5f49b1af2a2737 (patch)
tree30d4519cd6274c4933b51ef3f2eff8a7b0913c62 /src
parent15069164872bc6324a9c4201b91329d92cd23cfa (diff)
downloadVeraCrypt-5d5a645083c8eb885b0820361e5f49b1af2a2737.zip
VeraCrypt-5d5a645083c8eb885b0820361e5f49b1af2a2737.tar.gz
Windows: fix error caused by requesting large number of random bytes when writing randomly generated data to unused/reserved header areas.
Diffstat (limited to 'src')
-rw-r--r--src/Common/Volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c
index 3228aad..67b072d 100644
--- a/src/Common/Volumes.c
+++ b/src/Common/Volumes.c
@@ -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);