projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdc6e2c
)
NFS: Off-by-one length error in string handling
author
Chuck Lever
<chuck.lever@oracle.com>
Wed, 29 Aug 2007 21:59:01 +0000
(17:59 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Sat, 1 Sep 2007 14:14:40 +0000
(10:14 -0400)
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>
fs/nfs/super.c
patch
|
blob
|
history
diff --git
a/fs/nfs/super.c
b/fs/nfs/super.c
index 9cd0828010cff7a7e41f4438af6f62593a3513cf..ef3643284f72eaff73c1bccedf5ba17f5004cb90 100644
(file)
--- 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);