mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
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>
This commit is contained in:
parent
5a022fc870
commit
9c7544d3a1
1 changed files with 2 additions and 2 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue