From: Mi Jinlong Date: Mon, 29 Nov 2010 15:59:10 +0000 (-0500) Subject: libnfs.a: fix a bug when parse section's arg X-Git-Tag: nfs-utils-1-2-4-rc3 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=3c6973c595d62dc6452967d50ae8abe69f9f8bad;p=nfs-utils.git 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 --- 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 {