[Samba] Samba3.0.0rc3 -> charset

Jeremy Allison jra at samba.org
Tue Sep 9 21:13:14 GMT 2003


On Tue, Sep 09, 2003 at 04:35:33PM -0400, Rob Naccarato wrote:
> rc3 likes to burn my cpu. I get this in the logs:
> 
> [2003/09/09 16:18:22, 5] smbd/filename.c:unix_convert(114)
>   unix_convert called on file "\<EF><B1><90><C3><A9><E2><82><A4>^N<C2><92>^V<EF><97><AC><C3><A9>"
> [2003/09/09 16:18:22, 3] lib/util.c:unix_clean_name(580)
>   unix_clean_name [/<EF><B1><90><C3><A9><E2><82><A4>^N<C2><92>^V<EF><97><AC><C3><A9>]
> [2003/09/09 16:18:22, 3] lib/charcnv.c:convert_string_internal(209)
>   convert_string_internal: Conversion error: Illegal multibyte sequence(p<D8>)
> [2003/09/09 16:18:22, 5] smbd/filename.c:unix_convert(188)
>   unix_convert begin: name = <EF><B1><90><C3><A9><E2><82><A4>^N<C2><92>^V<EF><97><AC><C3><A9>, dirpath = , start =
>  <EF><B1><90><C3><A9><E2><82><A4>^N<C2><92>^V<EF><97><AC><C3><A9>
> 
> I changed "unix charset" from the default of UTF8 to ASCII and now
> things work very well.
> 
> Any ideas what's happening?

Please try the following patch, change back to utf8 and see if it
fixes the problem. It just missed the RC3 cutoff but is in CVS.

Jeremy.

--- lib/charcnv.c       Mon Sep  8 07:13:30 2003
+++ /home/jeremy/src/samba3.0/source/lib/charcnv.c      Mon Sep  8 14:27:10 2003
@@ -270,7 +270,7 @@
                                        break;
                        } else {
                                if (srclen == (size_t)-1) {
-                                       srclen = strlen(src)+1;
+                                       srclen = strlen(p)+1;
                                }
                                return retval + convert_string_internal(from, to, p, srclen, q, destlen);
                        }
@@ -296,7 +296,7 @@
                                        break;
                        } else {
                                if (srclen == (size_t)-1) {
-                                       srclen = strlen_w(src)+2;
+                                       srclen = strlen_w((const void *)p)+2;
                                }
                                return retval + convert_string_internal(from, to, p, srclen, q, destlen);
                        }
@@ -322,7 +322,7 @@
                                        break;
                        } else {
                                if (srclen == (size_t)-1) {
-                                       srclen = strlen(src)+1;
+                                       srclen = strlen(p)+1;
                                }
                                return retval + convert_string_internal(from, to, p, srclen, q, destlen);
                        }




More information about the samba mailing list