mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2024-09-09 11:01:31 +02:00
Securely erase and protect buffer holding decrypted volume header.
This commit is contained in:
parent
7d6347f468
commit
8e2c5ca45e
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue