1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

cmdutils: remove the current working directory from the DLL search path on win32

Reviewed-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Hendrik Leppkes
2016-08-08 15:27:41 +02:00
committed by Michael Niedermayer
parent dbd7a84c81
commit 3bf142c773
6 changed files with 21 additions and 0 deletions

View File

@@ -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))