Index: selinux/setfiles.c
===================================================================
--- selinux/setfiles.c	(revision 20029)
+++ selinux/setfiles.c	(working copy)
@@ -189,8 +189,7 @@
 			file_sep = strrchr(tmp_path, '/');
 			if (file_sep == tmp_path) {
 				file_sep++;
-				p[0] = '\0';
-				p = path;
+				p = strcpy(path, "");
 			} else if (file_sep) {
 				*file_sep++ = '\0';
 				p = realpath(tmp_path, path);
