diff options
-rw-r--r-- | cfgparser.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cfgparser.c b/cfgparser.c index bce2bb6b5d..ea4a0f3e9f 100644 --- a/cfgparser.c +++ b/cfgparser.c @@ -284,8 +284,11 @@ int parse_config_file(struct config *conf, char *conffile) if (line[line_pos] == '\0' || line[line_pos] == '#') continue; - /* read option. accept char if isalnum(char) */ - for (opt_pos = 0; isalnum(line[line_pos]); /* NOTHING */) { + /* read option. */ + for (opt_pos = 0; isprint(line[line_pos]) && + line[line_pos] != ' ' && + line[line_pos] != '#' && + line[line_pos] != '='; /* NOTHING */) { opt[opt_pos++] = line[line_pos++]; if (opt_pos >= MAX_OPT_LEN) { PRINT_LINENUM; |