If you're talking about security as in "if this software isn't secured, important data could be leaked" I don't know.
If you just want to be sure that your software behave as you intended there are a few tools to help but I don't have much experience with them:
-
DrMemory
-
Valgrind
- Static analyzer
--- Visual Studio: cl file.cpp -analyze
--- Clang: clang file.cpp --analyze
---
CppCheck
---
PVS studio (not free)
-
Fuzzing
In handmade hero, Casey has some debug code (disabled most of the time) to check for buffer over/underflow: every allocation allocates an extra page of memory before (for underflow) or after (for overflow), and that page doesn't have write access. So if he was to write to those pages he would get an exception. I believe DrMemory and Valgrind can do that type of check but I'm not sure.