diff --git a/src/config_file.c b/src/config_file.c index 5f5e309e0..65971b930 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -1032,6 +1032,11 @@ static int parse_section_header_ext(struct reader *reader, const char *line, con */ first_quote = strchr(line, '"'); + if (first_quote == NULL) { + set_parse_error(reader, 0, "Missing quotation marks in section header"); + return -1; + } + last_quote = strrchr(line, '"'); quoted_len = last_quote - first_quote;