Skip to contentSkip to conversation

NFSD: Use unsigned length argument for decode_pathname

PATCH In review Chuck Lever 1 participant 1 message Nov 1, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/8 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.

---

 fs/nfsd/nfsxdr.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfsxdr.c +2 -2
index bc6fa20..1c16885 100644
@@ -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++) {

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs