]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/nfs/conffile.c
libnfs.a: fix a bug when parse section's arg
[nfs-utils.git] / 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 {