diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-08-29 17:59:01 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-09-01 10:14:40 -0400 |
commit | 350c73af6af51ae7654dad91874c0d30dd13bbbe (patch) | |
tree | 72c706f6085b79865cca7cda7a0ae3b13d8e3fe0 /fs/nfs | |
parent | fdc6e2c8c0dc0ac702fca0b802f5d9ae99a54bb6 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 9cd0828010cf..ef3643284f72 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); |