Linux NFS development
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: James Lentini <jlentini@netapp.com>
Cc: nfs@lists.sourceforge.net, trond.myklebust@fys.uio.no
Subject: Re: [PATCH] NFS: fix length computation in nfs_validate_mount_data
Date: Wed, 29 Aug 2007 16:30:44 -0400	[thread overview]
Message-ID: <46D5D774.20908@oracle.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0708291509500.2779@jlentini-linux.nane.netapp.com>

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

Yep, this is the same fix as one provided in the clean-up/bug-fix 
patches I just resent today.


James Lentini wrote:
> While experimenting with the new string mount infrastructure, I 
> noticed an off by one error in the computation of the hostname's 
> length. This patch fixes the length computation to match the same 
> computation in nfs4_validate_mount_data().
> 
> Signed-off-by: James Lentini <jlentini@netapp.com>
> ---
> 
>  fs/nfs/super.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- fs/nfs/super.c	2007-08-29 15:06:59.320932000 -0400
> +++ fs/nfs/super.c	2007-08-29 15:07:51.439960000 -0400
> @@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struc
>  		c = strchr(dev_name, ':');
>  		if (c == NULL)
>  			return -EINVAL;
> -		len = c - dev_name - 1;
> +		len = c - dev_name;
>  		if (len > sizeof(data->hostname))
>  			return -EINVAL;
>  		strncpy(data->hostname, dev_name, len);


[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
email;internet:chuck dot lever at nospam oracle dot com
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-08-29 20:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 19:26 [PATCH] NFS: fix length computation in nfs_validate_mount_data James Lentini
2007-08-29 20:30 ` Chuck Lever [this message]
2007-08-29 20:40   ` Trond Myklebust
2007-08-29 21:06     ` Chuck Lever
2007-08-29 21:10       ` Trond Myklebust
2007-08-29 20:56   ` James Lentini

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=46D5D774.20908@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=jlentini@netapp.com \
    --cc=nfs@lists.sourceforge.net \
    --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