]>
Commit | Line | Data |
---|---|---|
3d551623 PG |
1 | diff --git a/CHANGELOG b/CHANGELOG |
2 | index bc4d8fd..1bf4b27 100644 | |
3 | --- a/CHANGELOG | |
4 | +++ b/CHANGELOG | |
5 | @@ -9,6 +9,7 @@ | |
6 | - fix mount point directory creation for bind mounts. | |
7 | - add quoting for exports gathered by hosts map. | |
8 | - fix wait time resolution in alarm and state queue handlers. | |
9 | +- fix handling of quoted slash alone. | |
10 | ||
11 | 18/06/2007 autofs-5.0.2 | |
12 | ----------------------- | |
13 | diff --git a/lib/parse_subs.c b/lib/parse_subs.c | |
14 | index ad19f34..3627f44 100644 | |
15 | --- a/lib/parse_subs.c | |
16 | +++ b/lib/parse_subs.c | |
17 | @@ -297,7 +297,8 @@ char *sanitize_path(const char *path, int origlen, unsigned int type, unsigned i | |
18 | return NULL; | |
19 | } | |
20 | ||
21 | - if (origlen > 1 && *(cp - 1) == '/') | |
22 | + /* Remove trailing / but watch out for a quoted / alone */ | |
23 | + if (strlen(cp) > 1 && origlen > 1 && *(cp - 1) == '/') | |
24 | *(cp - 1) = '\0'; | |
25 | ||
26 | return s_path; |