diff options
author | Hendrik Leppkes <[email protected]> | 2016-08-08 15:27:41 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2016-08-08 18:41:13 +0200 |
commit | 9745c5ebf87311657b7ba42eb36a7b05de57cb07 (patch) | |
tree | bc9d19f9ebb5d24c27772aee01b7a4c000f2049c /cmdutils.c | |
parent | 19d2921bbfec13c7a843bdbdb5687cf821b02cff (diff) |
cmdutils: remove the current working directory from the DLL search path on win32
Reviewed-by: Matt Oliver <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 3bf142c77337814458ed8e036796934032d9837f)
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c index 03a4836207..6960f8c99c 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -107,6 +107,15 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v } } +void init_dynload(void) +{ +#ifdef _WIN32 + /* Calling SetDllDirectory with the empty string (but not NULL) removes the + * current working directory from the DLL search path as a security pre-caution. */ + SetDllDirectory(""); +#endif +} + static void (*program_exit)(int ret); void register_exit(void (*cb)(int ret)) |