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

Jeff Layton <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Wed, 22 Apr 2009 02:25:05 +0200
Günter Kukkukk <[email protected]> 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 <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.