On Sat, Sep 07, 2013 at 02:02:26AM +0200, Laurent Blume wrote: > On 2013-09-06 10:54 PM, Jeremy Allison wrote: > > > Either that or add another debug inside > > convert_string_internal() to print out > > the values of srclen and i_len at various > > points and try and determine why it's off > > by one. > > Well, it was /quite/ further than that. > > I think I got it this time, in sources3/smbd/mangle_hash2.c: > > /* > * Note that if CH_UNIX is utf8 a string may be 3 > * bytes, but this is ok as mb utf8 characters don't > * contain embedded ascii bytes. We are really > checking > * for mb UNIX asian characters like Japanese > (SJIS) here. > * JRA. > */ > DEBUG(3, ("DEBUG ++ name, %s\n", name)); > >>>> if (convert_string(CH_UNIX, CH_UTF16LE, > name, 2, mbc, 2, False) == 2) { > /* Was a good mb string. */ > name += 2; > continue; > } > DEBUG(3, ("DEBUG -- name, %s\n", name)); > > > Why is the length here hardcoded to 2? > > It's past 2am around here, so I could be missing something, time for bed.
Woo hoo ! I think you've found an oooooold old bug :-). I'll take a look at that asap. Thanks ! Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba