mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 06:25:37 +03:00
conf-parser: refuse section headers with control characters early, just in case
This commit is contained in:
parent
73a4ac8a75
commit
cec7f09dc8
@ -194,6 +194,9 @@ static int parse_line(
|
||||
if (!n)
|
||||
return log_oom();
|
||||
|
||||
if (!string_is_safe(n))
|
||||
return log_syntax(unit, LOG_ERR, filename, line, SYNTHETIC_ERRNO(EBADMSG), "Bad characters in section header '%s'", l);
|
||||
|
||||
if (sections && !nulstr_contains(sections, n)) {
|
||||
bool ignore;
|
||||
const char *t;
|
||||
|
Loading…
Reference in New Issue
Block a user