summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsxdr.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-11-01 16:57:14 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-01 16:42:03 -0500
commit9c7544d3a195cde33b3d1e46639b23c221f901db (patch)
treee7e40b375facc363268be3794f03fea5d2c57c20 /fs/nfsd/nfsxdr.c
parent5a022fc8700cadbac373766cf1b5c746ffec7164 (diff)
downloadlinux-9c7544d3a195cde33b3d1e46639b23c221f901db.tar.gz
linux-9c7544d3a195cde33b3d1e46639b23c221f901db.tar.bz2
linux-9c7544d3a195cde33b3d1e46639b23c221f901db.zip
NFSD: Use unsigned length argument for decode_pathname
Clean up: path name lengths are unsigned on the wire, negative lengths are not meaningful natively either. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/nfsxdr.c')
-rw-r--r--fs/nfsd/nfsxdr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
index 50bd6187edfc..7003c313272f 100644
--- a/fs/nfsd/nfsxdr.c
+++ b/fs/nfsd/nfsxdr.c
@@ -78,10 +78,10 @@ decode_filename(__be32 *p, char **namp, unsigned int *lenp)
}
static __be32 *
-decode_pathname(__be32 *p, char **namp, int *lenp)
+decode_pathname(__be32 *p, char **namp, unsigned int *lenp)
{
char *name;
- int i;
+ unsigned int i;
if ((p = xdr_decode_string_inplace(p, namp, lenp, NFS_MAXPATHLEN)) != NULL) {
for (i = 0, name = *namp; i < *lenp; i++, name++) {