Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 5f15b8690fd88aa8b2d835f26230ba86 > files > 24

autofs-5.0.2-8mdv2008.0.src.rpm

diff --git a/CHANGELOG b/CHANGELOG
index bc4d8fd..1bf4b27 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,7 @@
 - fix mount point directory creation for bind mounts.
 - add quoting for exports gathered by hosts map.
 - fix wait time resolution in alarm and state queue handlers.
+- fix handling of quoted slash alone.
 
 18/06/2007 autofs-5.0.2
 -----------------------
diff --git a/lib/parse_subs.c b/lib/parse_subs.c
index ad19f34..3627f44 100644
--- a/lib/parse_subs.c
+++ b/lib/parse_subs.c
@@ -297,7 +297,8 @@ char *sanitize_path(const char *path, int origlen, unsigned int type, unsigned i
 		return NULL;
 	}
 
-	if (origlen > 1 && *(cp - 1) == '/')
+	/* Remove trailing / but watch out for a quoted / alone */
+	if (strlen(cp) > 1 && origlen > 1 && *(cp - 1) == '/')
 		*(cp - 1) = '\0';
 
 	return s_path;