[misc] switch to using LoadLibraryEx everywhere

* This allows us to further mitigate DLL side loading by enforcing
  LOAD_LIBRARY_SEARCH_SYSTEM32 / LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR.
This commit is contained in:
Pete Batard 2021-04-09 11:31:52 +01:00
parent c9e71de898
commit 2a3e82fa96
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
8 changed files with 25 additions and 12 deletions

View file

@ -311,7 +311,7 @@ static BOOL ExtractMSDOS(const char* path)
goto out;
}
static_strcat(dllname, "\\diskcopy.dll");
hDLL = LoadLibraryA(dllname);
hDLL = LoadLibraryExA(dllname, NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if (hDLL == NULL) {
uprintf("Unable to open %s: %s\n", dllname, WindowsErrorString());
goto out;