From 78d17fa09983cb1300c9a68ad657ce3949204ec1 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Jun 2018 00:30:18 +0900 Subject: [PATCH] conf-parser: reject utf8-invalid lines --- src/shared/conf-parser.c | 3 +++ 1 file changed, 3 insertions(+) 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;