/* Decode a file name and make sure that the path contains no slashes or null bytes.  */
static __be32* decode_filename(__be32 *p, char **namp, unsigned int *lenp)
/* Decode a file name and make sure that the path contains no slashes or null bytes.  */
static __be32* decode_filename(__be32 *p, char **namp, unsigned int *lenp)
{
	char		*name;
	unsigned int	i;
	if ((p = xdr_decode_string_inplace(p, namp, lenp, NFS3_MAXNAMLEN)) != NULL) {
		for (i = 0, name = *namp; i < *lenp; i++, name++) {
			if (*name == '\0' || *name == '/')
				return NULL;
		}
	}
	return p;
}