1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-12 11:28:26 -06:00

Windows: Fix failure of Screen Readers (Accessibility support) to reader UI by disabling newly introduced memory protection by default and adding a CLI switch (/protectMemory) to enable it when needed. This fixes issue https://github.com/veracrypt/VeraCrypt/issues/536

This commit is contained in:
Mounir IDRASSI
2020-01-21 00:53:32 +01:00
parent 8fe3eb0136
commit b6c290e4fd
5 changed files with 97 additions and 3 deletions

View File

@@ -6145,6 +6145,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
ExtractCommandLine (hwndDlg, (wchar_t *) lParam);
if (EnableMemoryProtection)
{
/* Protect this process memory from being accessed by non-admin users */
EnableProcessProtection ();
}
if (ComServerMode)
{
InitDialog (hwndDlg);
@@ -9001,6 +9007,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
OptionNoSizeCheck,
OptionQuickFormat,
OptionFastCreateFile,
OptionEnableMemoryProtection,
};
argument args[]=
@@ -9024,6 +9031,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
{ OptionNoSizeCheck, L"/nosizecheck", NULL, FALSE },
{ OptionQuickFormat, L"/quick", NULL, FALSE },
{ OptionFastCreateFile, L"/fastcreatefile", NULL, FALSE },
{ OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE },
// Internal
{ CommandResumeSysEncLogOn, L"/acsysenc", L"/a", TRUE },
@@ -9384,6 +9392,10 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
CmdFastCreateFile = TRUE;
break;
case OptionEnableMemoryProtection:
EnableMemoryProtection = TRUE;
break;
case OptionHistory:
{
wchar_t szTmp[8] = {0};