diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-01-21 00:53:32 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-01-21 01:46:11 +0100 |
commit | b6c290e4fd77c5d4ae1f5fb68e69006d49e1ad52 (patch) | |
tree | cfb80ee4a2ebe9ee39c6179a9aae63bbf4591873 /src/Mount | |
parent | 8fe3eb0136b9105ff9adabc10f04814e932fc2dc (diff) | |
download | VeraCrypt-b6c290e4fd77c5d4ae1f5fb68e69006d49e1ad52.tar.gz VeraCrypt-b6c290e4fd77c5d4ae1f5fb68e69006d49e1ad52.zip |
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
Diffstat (limited to 'src/Mount')
-rw-r--r-- | src/Mount/Mount.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index ac25ba58..36fa1815 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -6859,6 +6859,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa AbortProcess ("COMMAND_LINE_ERROR"); } + if (EnableMemoryProtection) + { + /* Protect this process memory from being accessed by non-admin users */ + EnableProcessProtection (); + } + if (ComServerMode) { InitDialog (hwndDlg); @@ -8883,6 +8889,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) OptionNoWaitDlg, OptionSecureDesktop, OptionDisableDeviceUpdate, + OptionEnableMemoryProtection, }; argument args[]= @@ -8912,6 +8919,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) { OptionNoWaitDlg, L"/nowaitdlg", NULL, FALSE }, { OptionSecureDesktop, L"/secureDesktop", NULL, FALSE }, { OptionDisableDeviceUpdate, L"/disableDeviceUpdate", NULL, FALSE }, + { OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE }, }; argumentspec as; @@ -9008,6 +9016,12 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) } break; + case OptionEnableMemoryProtection: + { + EnableMemoryProtection = TRUE; + } + break; + case OptionCache: { wchar_t szTmp[16] = {0}; |