You can have difference between buffer overflow and buffer overrun in C/C++:
- We could define overflow when you index/point beyond the original buffer size (e.g read the 6th element of a 3 element array)
- We could define overrun, when you have multiple adjacent buffers after each other, and you index into the second (e.g read the 6th element of the first 3-element array but you get the 3rd element of the second 3-element array).
Stack overflow is kinda buffer overflow when you fill your entire stack 'memory buffer'.