loader: Disable loading codecs from the current directory

While convenient, it is too risky.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32025 b3059339-0415-0410-9bf9-f77b7e298cf2

100l, we need to search for SetDllDirectoryA instead of SetDllDirectory

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32026 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-08-27 16:28:53 +00:00 committed by Uoti Urpala
parent 04b8751a5c
commit 5c083f82ca
2 changed files with 9 additions and 1 deletions

View File

@ -381,6 +381,10 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR libname, HANDLE hfile, DWORD flags)
// if(fs_installed==0)
// install_fs();
// Do not load libraries from a path relative to the current directory
if (*libname != '/')
i++;
while (wm == 0 && listpath[++i])
{
if (i < 2)

View File

@ -3210,9 +3210,13 @@ int i;
{
HMODULE kernel32 = GetModuleHandle("Kernel32.dll");
BOOL WINAPI (*setDEP)(DWORD) = NULL;
if (kernel32)
BOOL WINAPI (*setDllDir)(LPCTSTR) = NULL;
if (kernel32) {
setDEP = GetProcAddress(kernel32, "SetProcessDEPPolicy");
setDllDir = GetProcAddress(kernel32, "SetDllDirectoryA");
}
if (setDEP) setDEP(3);
if (setDllDir) setDllDir("");
}
// stop Windows from showing all kinds of annoying error dialogs
SetErrorMode(0x8003);