[MPlayer-cvslog] r29683 - trunk/mplayer.c
reimar
subversion at mplayerhq.hu
Wed Sep 16 20:07:19 CEST 2009
Author: reimar
Date: Wed Sep 16 20:07:19 2009
New Revision: 29683
Log:
Hack: set DEP/NX on Windows via SetProcessDEPPolicy.
This should really be done via the NXCOMPAT PE flag, but looks like
binutils will not get support for it any time soon and not having this
security feature enabled is just ridiculous.
Modified:
trunk/mplayer.c
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c Wed Sep 16 14:14:17 2009 (r29682)
+++ trunk/mplayer.c Wed Sep 16 20:07:19 2009 (r29683)
@@ -2606,6 +2606,13 @@ int gui_no_filename=0;
#endif
#if defined(__MINGW32__) || defined(__CYGWIN__)
+ {
+ HMODULE kernel32 = GetModuleHandle("Kernel32.dll");
+ BOOL WINAPI (*setDEP)(DWORD) = NULL;
+ if (kernel32)
+ setDEP = GetProcAddress(kernel32, "SetProcessDEPPolicy");
+ if (setDEP) setDEP(3);
+ }
// stop Windows from showing all kinds of annoying error dialogs
SetErrorMode(0x8003);
// request 1ms timer resolution
More information about the MPlayer-cvslog
mailing list