From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Thu, 4 Apr 2013 16:49:08 -0400 To: 9fans@9fans.net Message-ID: <0b2786f721d464915432e88eed91c18f@ladd.quanstro.net> In-Reply-To: References: <1d60ad5fac2f22abe5687a2325ab9c63@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] IOHDRSZ Topicbox-Message-UUID: 3e986312-ead8-11e9-9d60-3106f5b1d025 > On 4 April 2013 20:50, erik quanstrom wrote: > > > so > > i think this assumption is going to lead to > > 6-byte buffer overruns. > > > > I don't follow the reasoning. bufsize + Rread or Twrite will always fit. > bufsize is the limit for application data. The receiving 9P also trims the > count > to match the receiving buffer. i'm thinking of applications that have a seperate buffer for data. in this case, i can't think of a clean way of sizing that seperate buffer correctly. if msize=bufsize+IOHDRSZ, then incoming bytes would be too big. - erik