VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library/PasswordLib
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-09-26 07:56:26 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-17 18:17:48 +0200
commitc97186ae96d4835841b02d377a9002d078a6f83b (patch)
tree80789b09c967f6b1aad9d36108bb729f216aebe4 /Library/PasswordLib
parent224b1cc286122b8aca5002fec31ed0390b299403 (diff)
downloadVeraCrypt-DCS-c97186ae96d4835841b02d377a9002d078a6f83b.tar.gz
VeraCrypt-DCS-c97186ae96d4835841b02d377a9002d078a6f83b.zip
Ensure sensitive memory is correctly erased.
Diffstat (limited to 'Library/PasswordLib')
-rw-r--r--Library/PasswordLib/ConsolePassword.c1
-rw-r--r--Library/PasswordLib/PicturePassword.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/Library/PasswordLib/ConsolePassword.c b/Library/PasswordLib/ConsolePassword.c
index c195b48..1b8c48a 100644
--- a/Library/PasswordLib/ConsolePassword.c
+++ b/Library/PasswordLib/ConsolePassword.c
@@ -116,6 +116,7 @@ AskConsolePwdInt(
} while (key.UnicodeChar != CHAR_CARRIAGE_RETURN);
if (length != NULL) *length = count;
+ burn (&key, sizeof (key));
// Set end of line
if (asciiLine != NULL) {
asciiLine[count] = '\0';
diff --git a/Library/PasswordLib/PicturePassword.c b/Library/PasswordLib/PicturePassword.c
index 67ffcbe..886ffcd 100644
--- a/Library/PasswordLib/PicturePassword.c
+++ b/Library/PasswordLib/PicturePassword.c
@@ -628,6 +628,8 @@ AskPictPwdInt(
pwdAction = PwdActNone;
} while (TRUE);
+ burn (&key, sizeof (key));
+ burn (&pwdNewChar, sizeof (pwdNewChar));
gBS->CloseEvent(InputEvents[1]);
gBS->CloseEvent(UpdateEvent);
gBS->CloseEvent(BeepOffEvent);