diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-16 18:07:19 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-16 18:07:19 +0000 |
commit | 1782e34b55f8f0fdb3504ee05a2ec94b7aae73e1 (patch) | |
tree | 2f220f66a2f4cb4b76511c3cac972de696f46d10 /mplayer.c | |
parent | 11ce51e3f08d01fbe6339c8c06b8e44965903ed7 (diff) | |
download | mpv-1782e34b55f8f0fdb3504ee05a2ec94b7aae73e1.tar.bz2 mpv-1782e34b55f8f0fdb3504ee05a2ec94b7aae73e1.tar.xz |
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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29683 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |