1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-18 19:41:01 -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:
Simon Tatham
2016-07-18 20:02:32 +01:00
parent f56dd17709
commit 9398d23033
7 changed files with 43 additions and 0 deletions

View File

@ -478,6 +478,7 @@ void show_help(HWND hwnd);
* Exports from winmisc.c.
*/
extern OSVERSIONINFO osVersion;
void dll_hijacking_protection(void);
BOOL init_winver(void);
HMODULE load_system32_dll(const char *libname);
const char *win_strerror(int error);