]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
conf-parser: fix continuation handling
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Jun 2019 18:00:22 +0000 (03:00 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Jun 2019 18:00:26 +0000 (03:00 +0900)
Before this commit, empty lines cannot break continuation.
The bug was introduced by 9adbfeb38ac101d6f73a033bb120d63513ffb240.

Closes #12883.

src/shared/conf-parser.c

index 2df09edaf57cb733dec20e0000cce20c88429435..f45dd798b217570a7913f92c11a01f1dededc9fe 100644 (file)
@@ -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;