From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Fri, 16 Nov 2007 10:18:54 +0000 From: "Douglas A. Gwyn" Message-ID: <473CA225.86119D3C@null.net> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable References: <15aabbdb3c4953608a4f19497b3bffb0@terzarima.net>, <815f4e4b0711091501v53a37569x5c5f576623fb9547@mail.gmail.com> Subject: Re: [9fans] Bounds checking bug ifcall(2) functions Topicbox-Message-UUID: fc734ec0-ead2-11e9-9d60-3106f5b1d025 Erik Dal=E9n 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.