Buffer overflow protection refers to various techniques used during software development to enhance the security of executable programs by detecting
buffer overflows on
stack-allocated variables, and preventing them from causing program misbehavior or from becoming serious
security vulnerabilities. A stack buffer overflow occurs when a program writes to a memory address on the program's call stack outside of the intended data structure, which is usually a fixed-length buffer. Stack buffer overflow bugs are caused when a program writes more data to a buffer located on the stack than what is actually allocated for that buffer. This almost always results in corruption of adjacent data on the stack, which could lead to program crashes, incorrect operation, or security issues.