Marcelo Tosatti <[email protected]> writes: > > That's one problem. > > > > > If thats the reason, you don't need the "-1" there? > > > > It also writes a 0 byte. I think it looks like this: > > > > ---- ------------ - > > len string... 0 > > If an overflow happens (len > rcvbuf->page_len) the last character will get > truncated anyway, so there is no need for the "-1" AFAICS. I'm not sure I follow. The code writes a 0 at rcvbuf->pages[0][sizeof(u32) + len], right? Doesn't that make the maximum allowed value of len should be 'rcvbuf->page_len - sizeof(u32) - 1' ? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: Peter Staubach <[email protected]>
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- References:
- [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: Assar <[email protected]>
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: [email protected]
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: Assar <[email protected]>
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: [email protected]
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: Assar <[email protected]>
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: Marcelo Tosatti <[email protected]>
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: Assar <[email protected]>
- Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- From: Marcelo Tosatti <[email protected]>
- [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- Prev by Date: Re: [PATCH 2.6.13 5/14] sas-class: sas_discover.c Discover process (end devices)
- Next by Date: Re: more fallout from ATI Xpress timer workaround (was: Linux 2.6.14-rc1)
- Previous by thread: Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- Next by thread: Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
- Index(es):