conf-parser: don't crash if an assignment is read before a section header
This commit is contained in:
+1
-1
@@ -122,7 +122,7 @@ static int parse_line(const char *filename, unsigned line, char **section, const
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sections && !strv_contains((char**) sections, *section))
|
||||
if (sections && (!*section || !strv_contains((char**) sections, *section)))
|
||||
return 0;
|
||||
|
||||
if (!(e = strchr(l, '='))) {
|
||||
|
||||
Reference in New Issue
Block a user