]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/nfs/conffile.c
Imported Upstream version 1.2.4
[nfs-utils.git] / support / nfs / conffile.c
index 24640f4a2c3923759ff3818acefb24a5dbaeb600..fa0dc6b792da8bb5fc8a6e4f8d461e6556002d39 100644 (file)
@@ -251,6 +251,7 @@ conf_parse_line(int trans, char *line, size_t sz)
                }
                /* Strip off any blanks before ']' */
                val = line;
+               j=0;
                while (*val && !isblank(*val)) 
                        val++, j++;
                if (*val)
@@ -271,9 +272,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 {