mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Protect against using a container file as its own keyfile. Normalizing path names to never use '/' but always '\'.
This commit is contained in:
@@ -59,7 +59,7 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
|
||||
namespace VeraCryptExpander
|
||||
{
|
||||
/* defined in WinMain.c, referenced by ExpandVolumeWizard() */
|
||||
int ExtcvAskVolumePassword (HWND hwndDlg, Password *password, int *pkcs5, int *pim, BOOL* truecryptMode, char *titleStringId, BOOL enableMountOptions);
|
||||
int ExtcvAskVolumePassword (HWND hwndDlg, const char* fileName, Password *password, int *pkcs5, int *pim, BOOL* truecryptMode, char *titleStringId, BOOL enableMountOptions);
|
||||
}
|
||||
|
||||
|
||||
@@ -500,7 +500,7 @@ void ExpandVolumeWizard (HWND hwndDlg, char *lpszVolume)
|
||||
OpenVolumeContext expandVol;
|
||||
BOOL truecryptMode = FALSE;
|
||||
|
||||
if (!VeraCryptExpander::ExtcvAskVolumePassword (hwndDlg, &VolumePassword, &VolumePkcs5, &VolumePim, &truecryptMode, "ENTER_NORMAL_VOL_PASSWORD", FALSE))
|
||||
if (!VeraCryptExpander::ExtcvAskVolumePassword (hwndDlg, lpszVolume, &VolumePassword, &VolumePkcs5, &VolumePim, &truecryptMode, "ENTER_NORMAL_VOL_PASSWORD", FALSE))
|
||||
{
|
||||
goto ret;
|
||||
}
|
||||
@@ -509,7 +509,7 @@ void ExpandVolumeWizard (HWND hwndDlg, char *lpszVolume)
|
||||
WaitCursor();
|
||||
|
||||
if (KeyFilesEnable && FirstKeyFile)
|
||||
KeyFilesApply (hwndDlg, &VolumePassword, FirstKeyFile);
|
||||
KeyFilesApply (hwndDlg, &VolumePassword, FirstKeyFile, lpszVolume);
|
||||
|
||||
WaitCursor ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user