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:
audriusbuika
2026-04-16 04:31:02 +03:00
committed by GitHub
parent 3e9c47d256
commit 4fea6403ce
2 changed files with 5 additions and 1 deletions

View File

@@ -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;