From: Chuck Lever Date: Thu, 1 Nov 2007 20:57:14 +0000 (-0400) Subject: NFSD: Use unsigned length argument for decode_pathname X-Git-Tag: v2.6.25-rc1~1072^2~89 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c7544d3a195cde33b3d1e46639b23c221f901db;p=linux-2.6 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 Acked-By: NeilBrown Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c index 50bd6187ed..7003c31327 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++) {