aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-03-06 20:39:47 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-03-06 20:39:47 +0100
commita1919eb31f8901af5ad267ff40686d8c59f1afda (patch)
tree41111664139f11cc3b6960876735b0b4cadcb69a /ui
parentifaceconfig: more compact less function (diff)
downloadwireguard-windows-a1919eb31f8901af5ad267ff40686d8c59f1afda.tar.xz
wireguard-windows-a1919eb31f8901af5ad267ff40686d8c59f1afda.zip
syntax: safe dll loading
Diffstat (limited to 'ui')
-rw-r--r--ui/syntax/confview.c2
-rw-r--r--ui/syntax/syntaxedit.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ui/syntax/confview.c b/ui/syntax/confview.c
index 9083c252..32d100e8 100644
--- a/ui/syntax/confview.c
+++ b/ui/syntax/confview.c
@@ -151,7 +151,7 @@ bool register_conf_view(void)
if (parent_proc)
return true;
- lib = LoadLibraryW(L"msftedit.dll");
+ lib = LoadLibraryExW(L"msftedit.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if (!lib)
return false;
diff --git a/ui/syntax/syntaxedit.c b/ui/syntax/syntaxedit.c
index f9c61957..95356331 100644
--- a/ui/syntax/syntaxedit.c
+++ b/ui/syntax/syntaxedit.c
@@ -288,7 +288,7 @@ bool register_syntax_edit(void)
if (parent_proc)
return true;
- lib = LoadLibraryW(L"msftedit.dll");
+ lib = LoadLibraryExW(L"msftedit.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if (!lib)
return false;