From f1fd9a252b3c72b10c849846ef929b0a727feeed Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 4 Jun 2018 00:30:18 +0900 Subject: conf-parser: reject utf8-invalid lines --- src/shared/conf-parser.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 5e25eef18..32d26c36d 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -43,6 +43,7 @@ //#include "rlimit-util.h" //#include "rlimit-util.h" //#include "rlimit-util.h" +//#include "rlimit-util.h" int config_item_table_lookup( const void *table, @@ -220,6 +221,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; -- cgit v1.2.3