diff mplayer.c @ 31944:68574c0269e4

Disable loading codecs from the current directory. While convenient, it is too risky.
author reimar
date Fri, 27 Aug 2010 16:28:53 +0000
parents 6e0b5a97e00f
children 0e720002f853
line wrap: on
line diff
--- a/mplayer.c	Fri Aug 27 16:19:24 2010 +0000
+++ b/mplayer.c	Fri Aug 27 16:28:53 2010 +0000
@@ -2768,9 +2768,13 @@
 	{
 		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, "SetDllDirectory");
+		}
 		if (setDEP) setDEP(3);
+		if (setDllDir) setDllDir("");
 	}
 	// stop Windows from showing all kinds of annoying error dialogs
 	SetErrorMode(0x8003);