VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-01 15:36:20 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-17 18:40:21 +0200
commit8e2c5ca45ee2e7d16dd45e96e403d85a6ccdc7f0 (patch)
tree6e352f2a7f1832afffad84aaaf161bb4efa1f816 /src
parent7d6347f468050309d8b85089c13dd6d008297801 (diff)
downloadVeraCrypt-8e2c5ca45ee2e7d16dd45e96e403d85a6ccdc7f0.tar.gz
VeraCrypt-8e2c5ca45ee2e7d16dd45e96e403d85a6ccdc7f0.zip
Securely erase and protect buffer holding decrypted volume header.
Diffstat (limited to 'src')
-rw-r--r--src/Common/Volumes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c
index 178f47f0..0940941d 100644
--- a/src/Common/Volumes.c
+++ b/src/Common/Volumes.c
@@ -249,6 +249,7 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
#if !defined(DEVICE_DRIVER)
VirtualLock (&keyInfo, sizeof (keyInfo));
VirtualLock (&dk, sizeof (dk));
+ VirtualLock (&header, sizeof (header));
#endif
#endif // !defined(_UEFI)
@@ -571,10 +572,12 @@ err:
ret:
burn (&keyInfo, sizeof (keyInfo));
burn (dk, sizeof(dk));
+ burn (header, sizeof(header));
#if !defined(DEVICE_DRIVER) && !defined(_UEFI)
VirtualUnlock (&keyInfo, sizeof (keyInfo));
VirtualUnlock (&dk, sizeof (dk));
+ VirtualUnlock (&header, sizeof (header));
#endif
#if !defined(_UEFI)