From 2065e0ba3635afe575977c02c1efbbd62e9891bc Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Tue, 7 Jan 2014 23:17:44 +1100 Subject: w32: enable heap corruption detection Enable the terminate-on-corruption feature. This is recommended for new Windows applications and shouldn't cause a performance hit. It actually shouldn't change anything for 64-bit builds, since Win64 has this switched on by default. See: http://blogs.msdn.com/b/michael_howard/archive/2008/02/18/faq-about-heapsetinformation-in-windows-vista-and-heap-based-buffer-overruns.aspx --- player/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/player/main.c b/player/main.c index 400fab0426..2c93a67ca6 100644 --- a/player/main.c +++ b/player/main.c @@ -261,6 +261,9 @@ static void osdep_preinit(int *p_argc, char ***p_argv) #if defined(__MINGW32__) || defined(__CYGWIN__) // stop Windows from showing all kinds of annoying error dialogs SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); + + // Enable heap corruption detection + HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); #endif terminal_init(); -- cgit v1.2.3