VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-01-21 00:53:32 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-01-21 01:46:11 +0100
commitb6c290e4fd77c5d4ae1f5fb68e69006d49e1ad52 (patch)
treecfb80ee4a2ebe9ee39c6179a9aae63bbf4591873 /src/Format
parent8fe3eb0136b9105ff9adabc10f04814e932fc2dc (diff)
downloadVeraCrypt-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/Format')
-rw-r--r--src/Format/Tcformat.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 58800aa5..3d394c16 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -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};