diff options
author | Mi Jinlong <mijinlong@cn.fujitsu.com> | 2010-11-29 10:59:10 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-11-29 11:00:23 -0500 |
commit | 3c6973c595d62dc6452967d50ae8abe69f9f8bad (patch) | |
tree | bba85c7ef69b9a5dbaee60f7a9728f0105dfc039 /support/nfs | |
parent | 86f7be64cafd17d4a3f164603484eaedb4757431 (diff) | |
download | nfs-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/nfs')
-rw-r--r-- | support/nfs/conffile.c | 4 |
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 { |