The software writes data past the end, or before the beginning, of the intended buffer.
This typically occurs when the pointer or its index is incremented or decremented to a position beyond the bounds of the buffer or when pointer arithmetic results in a position outside of the valid memory location to name a few. This may result in corruption of sensitive information, a crash, or code execution among other things.
The following code attempts to save four different identification numbers into an array.
Example Language: C
/* Populate the id array. */
id_sequence = 123;
id_sequence = 234;
id_sequence = 345;
id_sequence = 456;