diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-04 00:30:18 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-04 00:30:18 +0900 |
commit | 78d17fa09983cb1300c9a68ad657ce3949204ec1 (patch) | |
tree | 5270ecd8703b3d581b7f289b0e4eafff30d44b43 | |
parent | 2b633119a073895c50d571fd8b32c5064a13806b (diff) | |
download | systemd-78d17fa09983cb1300c9a68ad657ce3949204ec1.tar.gz |
conf-parser: reject utf8-invalid lines
-rw-r--r-- | src/shared/conf-parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index a71ff524ae..159b923e9c 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -211,6 +211,9 @@ static int parse_line( return config_parse(unit, fn, NULL, sections, lookup, table, flags, userdata); } + if (!utf8_is_valid(l)) + return log_syntax_invalid_utf8(unit, LOG_WARNING, filename, line, l); + if (*l == '[') { size_t k; char *n; |