summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 33d9e2714a..3865017d97 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -595,7 +595,11 @@ int config_parse_exec(
skip = separate_argv0 + ignore;
/* skip special chars in the beginning */
- assert(skip < l);
+ if (l <= skip) {
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Empty path in command line, ignoring: %s", rvalue);
+ r = 0;
+ goto fail;
+ }
} else if (strneq(word, ";", MAX(l, 1U)))
/* new commandline */