]> git.pld-linux.org Git - packages/autofs.git/blame - autofs-5.0.4-fix-map-type-info-parse-error.patch
- import latest patchset.
[packages/autofs.git] / autofs-5.0.4-fix-map-type-info-parse-error.patch
CommitLineData
e5fd101c
PS
1autofs-5.0.4 - fix map type info parse error
2
3From: Ian Kent <raven@themaw.net>
4
5Fix a mistake in map type info parsing introduced by the IPv6 parse
6changes.
7---
8
9 CHANGELOG | 1 +
10 lib/parse_subs.c | 4 +++-
11 2 files changed, 4 insertions(+), 1 deletions(-)
12
13
14diff --git a/CHANGELOG b/CHANGELOG
15index 05e0206..3fd97d3 100644
16--- a/CHANGELOG
17+++ b/CHANGELOG
18@@ -55,6 +55,7 @@
19 - remount we created mount point fix.
20 - fix double free in sasl_bind().
21 - mannual umount recovery fixes.
22+- fix map type info parse error.
23
24 4/11/2008 autofs-5.0.4
25 -----------------------
26diff --git a/lib/parse_subs.c b/lib/parse_subs.c
27index 0cba95a..0608cb7 100644
28--- a/lib/parse_subs.c
29+++ b/lib/parse_subs.c
30@@ -315,6 +315,7 @@ struct map_type_info *parse_map_type_info(const char *str)
31 {
32 struct map_type_info *info;
33 char *buf, *type, *fmt, *map, *tmp;
34+ int seen_colon = 0;
35
36 buf = strdup(str);
37 if (!buf)
38@@ -335,11 +336,12 @@ struct map_type_info *parse_map_type_info(const char *str)
39 if (*tmp == ' ') {
40 *tmp = '\0';
41 break;
42- } else if (*tmp == ',') {
43+ } else if (!seen_colon && *tmp == ',') {
44 type = buf;
45 *tmp++ = '\0';
46 fmt = tmp;
47 } else if (*tmp == ':') {
48+ seen_colon = 1;
49 if (!fmt)
50 type = buf;
51 *tmp++ = '\0';
This page took 0.066413 seconds and 4 git commands to generate.