]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Define HeapEnableTerminationOnCorruption if the headers don't.
authorNick Mathewson <nickm@torproject.org>
Fri, 19 May 2017 10:44:13 +0000 (06:44 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 19 May 2017 10:46:49 +0000 (06:46 -0400)
MSDN says that it's always going to be 1, and they're usually pretty
accurate about that.

Fixes a bug in 21953.

src/or/main.c

index 2de8ed29acb08171a5639e9a6e98a1c5eb325dda..187b255bfbeb515a9f9796eb3a7de8f2af338f52 100644 (file)
@@ -3426,6 +3426,9 @@ tor_main(int argc, char *argv[])
   int result = 0;
 
 #ifdef _WIN32
+#ifndef HeapEnableTerminationOnCorruption
+#define HeapEnableTerminationOnCorruption 1
+#endif
   /* On heap corruption, just give up; don't try to play along. */
   HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
   /* Call SetProcessDEPPolicy to permanently enable DEP.