mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -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:
@@ -6184,6 +6184,16 @@ BOOL CheckFileExtension (char *fileName)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CorrectFileName (char* fileName)
|
||||
{
|
||||
/* replace '/' by '\' */
|
||||
size_t i, len = strlen (fileName);
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
if (fileName [i] == '/')
|
||||
fileName [i] = '\\';
|
||||
}
|
||||
}
|
||||
|
||||
void IncreaseWrongPwdRetryCount (int count)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user