summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-06-26 20:00:22 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-06-26 20:00:26 +0200
commit0ef69585d8583cd86e53195313dd08f50a0c6019 (patch)
treea7339e70ea174d785a44b116393b761f88aa28d8
parentexecute: drop SYNTHETIC_ERRNO because error code was received from the apply_... (diff)
downloadsystemd-0ef69585d8583cd86e53195313dd08f50a0c6019.tar.xz
systemd-0ef69585d8583cd86e53195313dd08f50a0c6019.zip
conf-parser: fix continuation handling
Before this commit, empty lines cannot break continuation. The bug was introduced by 9adbfeb38ac101d6f73a033bb120d63513ffb240. Closes #12883.
-rw-r--r--src/shared/conf-parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 2df09edaf5..f45dd798b2 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -322,7 +322,8 @@ int config_parse(const char *unit,
return r;
}
- if (strchr(COMMENTS, *skip_leading_chars(buf, WHITESPACE)))
+ l = skip_leading_chars(buf, WHITESPACE);
+ if (*l != '\0' && strchr(COMMENTS, *l))
continue;
l = buf;