mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-05-18 02:21:33 +00:00
Windows: Fix elevated COM format drive validation and device path normalization (#1670)
* Windows: Add input validation whitelists to elevated COM methods * Windows: Add drive number validation to FormatNtfs and FormatFs COM methods * Windows: Fix correctness regressions in elevated COM format and device path validation * Windows: Revert unready COM input validation; keep FormatNtfs/FormatFs return fix
This commit is contained in:
@@ -1041,7 +1041,7 @@ namespace VeraCrypt
|
||||
FileOpen = false;
|
||||
Elevated = false;
|
||||
|
||||
if (path.find(L"\\\\?\\") == 0)
|
||||
if (path.find(L"\\\\?\\") == 0 || path.find(L"\\\\.\\") == 0)
|
||||
effectivePath = path;
|
||||
else
|
||||
effectivePath = wstring (L"\\\\.\\") + path;
|
||||
|
||||
Reference in New Issue
Block a user