[linux-cifs-client] [PATCH 1/3] cifs: Introduce helper to compute length of nls string in bytes

Jeff Layton jlayton at redhat.com
Wed Apr 22 06:17:26 GMT 2009


On Wed, 22 Apr 2009 02:25:05 +0200
Günter Kukkukk <linux at kukkukk.com> wrote:
> 
> during cleanup of the unicode related stuff we should also have a look
> at functions currently located in misc.c
>   - cifs_convertUCSpath()
>   - cifsConvertToUCS()
> 
> At the moment cifs_convertUCSpath() contains the following check:
> ...
> 		/* make sure we do not overrun callers allocated temp buffer */
> 		if (j >= (2 * NAME_MAX))
> 			break;
> ...
> Probably both functions should be moved away from misc.c.

Agreed on all counts. For now, we're focused on the cases where we're
converting the data from the server to the local charset. After that's
resolved we need to fix the other direction as well.

It might make sense to consolidate all of this in a separate file
someplace as well.

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list