svn commit: samba r2931 - in branches/SAMBA_4_0/source/ntvfs/posix: .

tridge at samba.org tridge at samba.org
Tue Oct 12 06:07:55 GMT 2004


Author: tridge
Date: 2004-10-12 06:07:55 +0000 (Tue, 12 Oct 2004)
New Revision: 2931

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs/posix&rev=2931&nolog=1

Log:
use next_codepoint() to ensure we properly handle multi-byte characters in pvfs_unix_path()

Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c	2004-10-12 05:59:56 UTC (rev 2930)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_resolve.c	2004-10-12 06:07:55 UTC (rev 2931)
@@ -217,8 +217,10 @@
 
 	/* now do an in-place conversion of '\' to '/', checking
 	   for legal characters */
-	for (;*p;p++) {
-		switch (*p) {
+	while (*p) {
+		size_t c_size;
+		codepoint_t c = next_codepoint(p, &c_size);
+		switch (c) {
 		case '\\':
 			if (name->has_wildcard) {
 				/* wildcards are only allowed in the last part
@@ -251,6 +253,8 @@
 		case '|':
 			return NT_STATUS_ILLEGAL_CHARACTER;
 		}
+
+		p += c_size;
 	}
 
 	name->full_name = ret;



More information about the samba-cvs mailing list