From: Assar <assar@permabit.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
Valdis.Kletnieks@vt.edu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfs client, kernel 2.4.31: readlink result overflow
Date: 13 Sep 2005 16:01:11 -0400 [thread overview]
Message-ID: <784q8oivp4.fsf@sober-counsel.permabit.com> (raw)
In-Reply-To: <20050913193539.GB17222@dmt.cnet>
Marcelo Tosatti <marcelo.tosatti@cyclades.com> 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' ?
next prev parent reply other threads:[~2005-09-13 20:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-12 13:26 Assar
2005-09-12 18:46 ` Valdis.Kletnieks
2005-09-12 19:37 ` Assar
2005-09-12 20:01 ` Valdis.Kletnieks
2005-09-12 20:41 ` Assar
2005-09-12 20:53 ` Valdis.Kletnieks
2005-09-13 18:39 ` Marcelo Tosatti
2005-09-13 18:52 ` Assar
2005-09-13 19:35 ` Marcelo Tosatti
2005-09-13 20:01 ` Assar [this message]
2005-09-14 18:55 ` Peter Staubach
2005-09-14 19:41 ` Assar
2005-09-14 20:11 ` Peter Staubach
2005-09-14 22:20 ` Assar
2005-09-14 22:26 ` Peter Staubach
2005-09-14 20:15 ` Peter Staubach
2005-09-14 20:26 ` Assar
2005-09-14 20:27 ` Peter Staubach
2005-09-14 20:59 ` Assar
2005-09-13 20:36 ` Peter Staubach
2005-09-13 20:55 ` Assar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=784q8oivp4.fsf@sober-counsel.permabit.com \
--to=assar@permabit.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®