title: How to disable buffer overflow checking in the Visual C++ Runtime?
body: <p>i, and a <a href="http://www.google.com/search?q=a+buffer+overrun+has+been+detected+which+has+corrupted+the+program%27s+internal+state" rel="nofollow noreferrer">few thousand other people</a>, are getting an error being thrown by the Microsoft Visual C++ Runtime:</p>
  
  <p><a href="https://i.stack.imgur.com/YsLkq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YsLkq.png" alt="alt text"></a>
  </p>
  
  <p>Which for the benefit of search engines, says:</p>
  
  <pre><code>Microsoft Visual C++ Runtime Library
  
  Buffer overrun detected!
  
  Program: %s
  
  A buffer overrun has been detected which has corrupted the program's
  internal state. The program cannot safely continue execution and must
  now be terminated.
  </code></pre>
  
  <p>Now i understand what a buffer overrun is, and why it is a bad thing. Given Microsoft's new emphasis on "<em>it's just broken</em>", the extra buffer checks in <strong>MSVCRT</strong> can be a nice thing.</p>
  
  <p>On the other hand, i don't care. It's not that the program can't continue, it's that the program cannot <em>safely</em> continue. Well i'd rather be unsafe, because it's better than nothing. i enjoy living dangerously.</p>
  
  <p>So can anyone suggest anything? i was thinking things like:</p>
  
  <ul>
  <li>a registry key to prevent MSVCRT from halting execution</li>
  <li>running the application in compability with a previous operating system (previous to Windows 7)</li>
  <li>adding an assembly manifest to the executable folder so that it uses an older version of the MSVCRT, one which doesn't perform this overflow checking</li>
  <li>a version number, or download location, of a copy of MSVCRT that doesn't have the overflow checking</li>
  </ul>
  
  <p>i tried searching the support site of the company that wrote the <strong>Microsoft Visual C++ Runtime Library</strong>, but they have no mention of which functions could be overflowing, or how to disable overflow checking.</p>