r11269: Ensure the new canonicalize_servicename() is mb safe.
authorJeremy Allison <jra@samba.org>
Sun, 23 Oct 2005 19:00:40 +0000 (19:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:05:10 +0000 (11:05 -0500)
MB service names may contain embedded ' ' characters.
Jeremy.
(This used to be commit 83d0cda858de5f40ab652e1f438808a3bfac0f81)

source3/param/loadparm.c

index 13bb4a7d06472d2e837a491734532615766ab1ae..f084d52c26310c6952dbb4862d8fac90113c313e 100644 (file)
@@ -2452,7 +2452,7 @@ static char *canonicalize_servicename(const char *src)
        static fstring canon; /* is fstring large enough? */
        int dst_idx = 0;
 
-       for (; *src != '\0'; src++) {
+       for (; *src != '\0'; src += next_mb_char_size(src)) {
                if (isspace(*src)) {
                        continue;
                }