VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-12-08 23:11:11 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-12-08 23:42:54 +0100
commit07bb27e3b94ee26128d5c7f800cdcf3232ff281a (patch)
treeeb307f8841a6899bada7a0df6d16b073dc1a868c /src/Common/Dlgcode.c
parent5e96a5c44c3c78a901d77297517fa4842a297eb9 (diff)
downloadVeraCrypt-07bb27e3b94ee26128d5c7f800cdcf3232ff281a.tar.gz
VeraCrypt-07bb27e3b94ee26128d5c7f800cdcf3232ff281a.zip
Windows: use fix for CVE-2019-19501 only on Vista and above since it doesn't make sens under XP.
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 5a837865..5e2dc39a 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -14238,9 +14238,10 @@ cleanup:
// This function always loads a URL in a non-privileged mode
// If current process has admin privileges, we execute the command "rundll32 url.dll,FileProtocolHandler URL" as non-elevated
+// Use this security mechanism only starting from Windows Vista
void SafeOpenURL (LPCWSTR szUrl)
{
- if (IsAdmin ())
+ if (IsAdmin () && IsOSAtLeast (WIN_VISTA))
{
WCHAR szRunDllPath[TC_MAX_PATH];
WCHAR szUrlDllPath[TC_MAX_PATH];