mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-09 23:33:46 -05:00
Lock down the search path for Windows DLL loading.
At least on systems providing SetDefaultDllDirectories, this should stop PuTTY from being willing to load DLLs from its containing directory - which makes no difference when it's been properly installed (in which case the application dir contains no DLLs anyway), but does if it's being run from somewhere uncontrolled like a browser downloads directory. Preliminary testing suggests that this shouldn't break any existing deliberate use of DLLs, including GSSAPI providers.
This commit is contained in:
@ -347,6 +347,8 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
|
||||
HRESULT hr;
|
||||
int guess_width, guess_height;
|
||||
|
||||
dll_hijacking_protection();
|
||||
|
||||
hinst = inst;
|
||||
hwnd = NULL;
|
||||
flags = FLAG_VERBOSE | FLAG_INTERACTIVE;
|
||||
|
Reference in New Issue
Block a user