aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs3xdr.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-11-01 16:56:58 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-01 16:42:02 -0500
commitee1a95b3b3fccf3c825bd95f89a8e006901b03ed (patch)
tree6b690c38cd2d2e9ef782dc1150d2cfccb205dd2f /fs/nfsd/nfs3xdr.c
parentNLM: Fix sign of length of NLM variable length strings (diff)
downloadlinux-dev-ee1a95b3b3fccf3c825bd95f89a8e006901b03ed.tar.xz
linux-dev-ee1a95b3b3fccf3c825bd95f89a8e006901b03ed.zip
NFSD: Use unsigned length argument for decode_filename
Clean up: file 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/nfs3xdr.c')
-rw-r--r--fs/nfsd/nfs3xdr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index f917fd25858a..c02b8d69297d 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -88,10 +88,10 @@ encode_fh(__be32 *p, struct svc_fh *fhp)
* no slashes or null bytes.
*/
static __be32 *
-decode_filename(__be32 *p, char **namp, int *lenp)
+decode_filename(__be32 *p, char **namp, unsigned int *lenp)
{
char *name;
- int i;
+ unsigned int i;
if ((p = xdr_decode_string_inplace(p, namp, lenp, NFS3_MAXNAMLEN)) != NULL) {
for (i = 0, name = *namp; i < *lenp; i++, name++) {