.Net takes some mesures to prevent the buffer overrun, I want to know something about it

G

Guest

Nico,

I'm not sure what you're looking for. If you debug your program in Visual
Studio 2005 and you overrun a buffer, the debugger pops up a message box
telling you that you have corrupted the heap (if the buffer was allocated on
the heap) when you attempt to destroy the buffer. That is a part of the
development environment.

Anytime you work with buffers you need to make sure that you handle the edge
cases so that you avoid overruns. Especially when using buffers to process
data that can be variable in size. You need to create unit tests that make
it easy for you to test for those conditions. Watch in a memory window to
see exactly what is happening so that you can say with confidence that your
buffer is working as expected.

Good luck,

Kim Greenlee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top