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

Günter Kukkukk linux at kukkukk.com
Thu Apr 23 00:06:07 GMT 2009


Am Mittwoch, 22. April 2009 schrieb Jeff Layton:
> 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.
> 

Hi Jeff,

the function cifs_convertUCSpath() _is_ related to 
"...we're focused on the cases where we're converting the data from
the server to the local charset. ....".

And - it's heavily used.
Cheers, Günter


More information about the linux-cifs-client mailing list