A buffer overflow (or buffer overrun) occurs when the volume of data exceeds the storage capacity of the memory buffer.