diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/conf-parser.c | 2 | ||||
-rw-r--r-- | src/test/test-conf-parser.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index dae521ef9f..44df7493e2 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -793,7 +793,7 @@ int config_parse_strv(const char *unit, } if (!utf8_is_valid(word)) { - log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, rvalue); + log_syntax_invalid_utf8(unit, LOG_ERR, filename, line, word); free(word); continue; } diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c index be5d2611f8..77fcbc0dd3 100644 --- a/src/test/test-conf-parser.c +++ b/src/test/test-conf-parser.c @@ -109,8 +109,10 @@ static void test_config_parse_path(void) { test_config_parse_path_one("/path", "/path"); test_config_parse_path_one("/path//////////", "/path"); test_config_parse_path_one("///path/foo///bar////bar//", "/path/foo/bar/bar"); + test_config_parse_path_one("/path/\xc3\x80", "/path/\xc3\x80"); test_config_parse_path_one("not_absolute/path", NULL); + test_config_parse_path_one("/path/\xc3\x7f", NULL); } static void test_config_parse_log_level(void) { @@ -180,6 +182,8 @@ static void test_config_parse_strv(void) { test_config_parse_strv_one("foo", STRV_MAKE("foo")); test_config_parse_strv_one("foo bar foo", STRV_MAKE("foo", "bar", "foo")); test_config_parse_strv_one("\"foo bar\" foo", STRV_MAKE("foo bar", "foo")); + test_config_parse_strv_one("\xc3\x80", STRV_MAKE("\xc3\x80")); + test_config_parse_strv_one("\xc3\x7f", STRV_MAKE_EMPTY); } static void test_config_parse_mode(void) { |