Fixed a dropped '-'.
authorWayne Davison <wayned@samba.org>
Wed, 4 Feb 2004 03:01:32 +0000 (03:01 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 4 Feb 2004 03:01:32 +0000 (03:01 +0000)
util.c

diff --git a/util.c b/util.c
index d0d1c2b..13ab38e 100644 (file)
--- a/util.c
+++ b/util.c
@@ -734,7 +734,7 @@ void sanitize_path(char *p, char *reldir)
                while (1) {
                        /* copy one component through next slash */
                        *sanp++ = *p++;
-                       if (*p == '\0' || p[1] == '/') {
+                       if (*p == '\0' || p[-1] == '/') {
                                while (*p == '/') {
                                        /* skip multiple slashes */
                                        p++;