Jump to content
  • Advertisement
Sign in to follow this  
corrington_j

program to detect buffer overruns in c++

This topic is 5008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

are there any free pograms that will work with visual c++ .NET to detect buffer overruns. Actually, even if it was just a free trial that would be okay. Any suggestions.

Share this post


Link to post
Share on other sites
Advertisement
of course!
The .NET compiler itself :)

The /GS Option
The new /GS compile-time option adds special data (a cookie) to the stack between the local data and the return address. The startup code for a process or dynamic link library (DLL) determines and assigns a random value for the cookie. When the function returns (often referred to as function epilog), the compiler checks the cookie; if it has changed, then it calls a default error handler function that halts the process. Stopping the application is better than risking an attack.



Setting this option is simple; just follow these steps from within your Visual C++.NET project:

Open the project's Property Pages dialog box.

Click the C/C++ folder.

Click the Code Generation property page.

Set the Buffer Security Check property to Yes (/GS).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!