[misc] disable loading of DLLs from current directory

* This is done to prevent potential DLL sideloading attacks
This commit is contained in:
Pete Batard 2016-02-09 12:38:09 +00:00
parent e7f9ec6f0b
commit 8473e9ef56
2 changed files with 8 additions and 5 deletions

View file

@ -2828,6 +2828,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
{0, 0, NULL, 0}
};
// Disable loading system DLLs from the current directory (sideloading mitigation)
SetDllDirectoryA("");
uprintf("*** " APPLICATION_NAME " init ***\n");
// Reattach the console, if we were started from commandline