summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-08-29 17:59:01 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-09-01 10:14:40 -0400
commit350c73af6af51ae7654dad91874c0d30dd13bbbe (patch)
tree72c706f6085b79865cca7cda7a0ae3b13d8e3fe0 /fs/nfs
parentfdc6e2c8c0dc0ac702fca0b802f5d9ae99a54bb6 (diff)
NFS: Off-by-one length error in string handling
The hostname was getting truncated in the new text-based NFS mount API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 9cd0828010c..ef3643284f7 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options,
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);