summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorMi Jinlong <mijinlong@cn.fujitsu.com>2010-11-29 10:59:10 -0500
committerSteve Dickson <steved@redhat.com>2010-11-29 11:00:23 -0500
commit3c6973c595d62dc6452967d50ae8abe69f9f8bad (patch)
treebba85c7ef69b9a5dbaee60f7a9728f0105dfc039 /support
parent86f7be64cafd17d4a3f164603484eaedb4757431 (diff)
downloadnfs-utils-3c6973c595d62dc6452967d50ae8abe69f9f8bad.tar.gz
nfs-utils-3c6973c595d62dc6452967d50ae8abe69f9f8bad.tar.xz
nfs-utils-3c6973c595d62dc6452967d50ae8abe69f9f8bad.zip
libnfs.a: fix a bug when parse section's arg
When parsing section's arg at configure file, the pointer should stop when fetch ']', and give the warning message. Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support')
-rw-r--r--support/nfs/conffile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index 24640f4..798e5f3 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
@@ -271,9 +271,9 @@ conf_parse_line(int trans, char *line, size_t sz)
if (ptr == NULL)
return;
line = ++ptr;
- while (*ptr && *ptr != '"')
+ while (*ptr && *ptr != '"' && *ptr != ']')
ptr++;
- if (*ptr == '\0') {
+ if (*ptr == '\0' || *ptr == ']') {
xlog_warn("config file error: line %d: "
"non-matched '\"', ignoring until next section", ln);
} else {