diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-03-02 17:44:12 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-03-10 10:32:38 +0100 |
commit | 65500305404a6100b50161343637c115e5718c9e (patch) | |
tree | 84fecace8aeaf017adeae78b2b3bc67e1bad5e95 /src/Mount | |
parent | 68b9c9c72da2bb544098786c568902b902675bef (diff) | |
download | VeraCrypt-65500305404a6100b50161343637c115e5718c9e.tar.gz VeraCrypt-65500305404a6100b50161343637c115e5718c9e.zip |
Windows: Fix keyfiles path passed as CLI argument and set as default not always cleared from RAM when VeraCrypt exits
Diffstat (limited to 'src/Mount')
-rw-r--r-- | src/Mount/Mount.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index ca322280..6b491c55 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -158,14 +158,14 @@ MountOptions CmdMountOptions; BOOL CmdMountOptionsValid = FALSE; MountOptions mountOptions; MountOptions defaultMountOptions; -KeyFile *FirstCmdKeyFile; +KeyFile *FirstCmdKeyFile = NULL; HBITMAP hbmLogoBitmapRescaled = NULL; wchar_t OrigKeyboardLayout [8+1] = L"00000409"; BOOL bKeyboardLayoutChanged = FALSE; /* TRUE if the keyboard layout was changed to the standard US keyboard layout (from any other layout). */ BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informed that it is not possible to type characters by pressing keys while the right Alt key is held down. */ -static KeyFilesDlgParam hidVolProtKeyFilesParam; +static KeyFilesDlgParam hidVolProtKeyFilesParam = {0}; static MOUNT_LIST_STRUCT LastKnownMountList = {0}; VOLUME_NOTIFICATIONS_LIST VolumeNotificationsList; @@ -377,6 +377,9 @@ static void localcleanup (void) burn (&defaultMountOptions, sizeof (defaultMountOptions)); burn (szFileName, sizeof(szFileName)); + KeyFileRemoveAll (&FirstCmdKeyFile); + KeyFileRemoveAll (&hidVolProtKeyFilesParam.FirstKeyFile); + /* Cleanup common code resources */ cleanup (); @@ -7034,7 +7037,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa if (FirstCmdKeyFile) { KeyFileRemoveAll (&FirstKeyFile); - FirstKeyFile = FirstCmdKeyFile; + KeyFileCloneAll (FirstCmdKeyFile, &FirstKeyFile); KeyFilesEnable = TRUE; } |