Erik Dalén wrote: > On second thought I think you are correct. At the end of the function > the pointer might be one byte past the buffer size, but then it won't > do any reads or writes (But it could be a problem if the buffer is > right at the end of the virtual memory space :).
The C standard requires that pointer arithmetic work properly for one-past-the-end pointers. On some architectures that may mean that each data segment has to have an extra (unused) byte allocated, but on most architectures nothing special has to be done.
