Mercurial > mplayer.hg
changeset 29641:52e00a25ab71
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.
author | reimar |
---|---|
date | Wed, 16 Sep 2009 18:07:19 +0000 |
parents | f49560a603bf |
children | 0e6de6bc0eec |
files | mplayer.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Wed Sep 16 12:14:17 2009 +0000 +++ b/mplayer.c Wed Sep 16 18:07:19 2009 +0000 @@ -2606,6 +2606,13 @@ #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