From 5d9d49e989fa619ad0cd36951c3ba17a6f765346 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 14 Jun 2015 18:23:59 +0200 Subject: Windows: in "VeraCrypt Format.exe", erase the volume PIM value after the process is finished to avoid displaying it again if the user starts a new creation process right after --- src/Format/Tcformat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index f088c498..0c50ad34 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -381,6 +381,7 @@ static void WipePasswordsAndKeyfiles (void) burn (&szVerify[0], sizeof (szVerify)); burn (&volumePassword, sizeof (volumePassword)); burn (&szRawPassword[0], sizeof (szRawPassword)); + burn (&volumePin, sizeof (volumePin)); SetWindowText (hPasswordInputField, ""); SetWindowText (hVerifyPasswordInputField, ""); @@ -2694,6 +2695,7 @@ static void __cdecl volTransformThreadFunction (void *hwndDlgArg) // Clear the outer volume password memset(&szVerify[0], 0, sizeof (szVerify)); memset(&szRawPassword[0], 0, sizeof (szRawPassword)); + memset(&volumePin, 0, sizeof (volumePin)); MessageBeep (MB_OK); } @@ -9469,6 +9471,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, char *lpszComm VirtualLock (&volumePassword, sizeof(volumePassword)); VirtualLock (szVerify, sizeof(szVerify)); VirtualLock (szRawPassword, sizeof(szRawPassword)); + VirtualLock (&volumePin, sizeof(volumePin)); VirtualLock (MasterKeyGUIView, sizeof(MasterKeyGUIView)); VirtualLock (HeaderKeyGUIView, sizeof(HeaderKeyGUIView)); -- cgit v1.2.3