]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
libnfs.a: fix a bug when parse section's arg nfs-utils-1-2-4-rc3
authorMi Jinlong <mijinlong@cn.fujitsu.com>
Mon, 29 Nov 2010 15:59:10 +0000 (10:59 -0500)
committerSteve Dickson <steved@redhat.com>
Mon, 29 Nov 2010 16:00:23 +0000 (11:00 -0500)
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>
support/nfs/conffile.c

index 24640f4a2c3923759ff3818acefb24a5dbaeb600..798e5f374503242250d2b488f924049ea7444c44 100644 (file)
@@ -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 {