From ad3b8eca694ed4d7a0ff17f955736725aad0cea6 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 24 Aug 2015 01:31:30 +0200 Subject: Windows: Protect against using a container file as its own keyfile. Normalizing path names to never use '/' but always '\'. --- src/Common/Keyfiles.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Common/Keyfiles.h') diff --git a/src/Common/Keyfiles.h b/src/Common/Keyfiles.h index 61ca83e6..8400ebc3 100644 --- a/src/Common/Keyfiles.h +++ b/src/Common/Keyfiles.h @@ -30,6 +30,7 @@ typedef struct KeyFileStruct typedef struct { + char VolumeFileName[MAX_PATH + 1]; BOOL EnableKeyFiles; KeyFile *FirstKeyFile; } KeyFilesDlgParam; @@ -38,7 +39,7 @@ KeyFile *KeyFileAdd (KeyFile *firstKeyFile, KeyFile *keyFile); void KeyFileRemoveAll (KeyFile **firstKeyFile); KeyFile *KeyFileClone (KeyFile *keyFile); KeyFile *KeyFileCloneAll (KeyFile *firstKeyFile); -BOOL KeyFilesApply (HWND hwndDlg, Password *password, KeyFile *firstKeyFile); +BOOL KeyFilesApply (HWND hwndDlg, Password *password, KeyFile *firstKeyFilem, const char* volumeFileName); BOOL CALLBACK KeyFilesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); BOOL KeyfilesPopupMenu (HWND hwndDlg, POINT popupPosition, KeyFilesDlgParam *dialogParam); -- cgit v1.2.3