Buffer Overflow Causes. ©2002, Jedidiah R. Crandall, Susan L. Gerhart, Jan G. Hogle.  http://sfsecurity.pr.erau.edu
Formatting and logical errors – Recommendations.
Always test a variety of inputs to make sure the program behavior is what you expect.
Code inspection is likely to catch buffer overflow errors that testing doesn’t.
Assume that ALL buffer overflows are security problems.
Don’t assume that all buffer overflows are caused by long strings.