views:

29

answers:

1

My concern is the definition of buffer overrun. Looks like it only applies to writing outside the buffer.

But recently we found a spectacular bug when the program attempted to read from outside the legally allocated block of memory and ran into undefined behavior - either crashed with access violation or sent unrelated data across the network. Obviously reading from outside the buffer is not good as well.

Does reading from outside the buffer count as buffer overrun? If not - how can it be called?

+4  A: 

No, it isn't an overrun - after all, this can happen when there is no buffer involved. I'd simply call it an illegal memory access.

anon