[MPlayer-cvslog] r32028 - in branches/1.0rc4: . loader/module.c mplayer.c
siretart
subversion at mplayerhq.hu
Sat Aug 28 16:20:59 CEST 2010
Author: siretart
Date: Sat Aug 28 16:20:58 2010
New Revision: 32028
Log:
Disable loading codecs from the current directory.
While convenient, it is too risky.
backport r32025 and r32026 by reimar
Modified:
branches/1.0rc4/ (props changed)
branches/1.0rc4/loader/module.c
branches/1.0rc4/mplayer.c
Modified: branches/1.0rc4/loader/module.c
==============================================================================
--- branches/1.0rc4/loader/module.c Fri Aug 27 23:58:14 2010 (r32027)
+++ branches/1.0rc4/loader/module.c Sat Aug 28 16:20:58 2010 (r32028)
@@ -381,6 +381,10 @@ HMODULE WINAPI LoadLibraryExA(LPCSTR lib
// 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)
Modified: branches/1.0rc4/mplayer.c
==============================================================================
--- branches/1.0rc4/mplayer.c Fri Aug 27 23:58:14 2010 (r32027)
+++ branches/1.0rc4/mplayer.c Sat Aug 28 16:20:58 2010 (r32028)
@@ -2746,9 +2746,13 @@ int gui_no_filename=0;
{
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);
More information about the MPlayer-cvslog
mailing list