summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2017-10-11 12:27:13 +0900
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-10-14 21:29:35 +0200
commit7ba74d5f939d0322d6ea730dd0b5ceefd7d7f527 (patch)
treefcd7674e397592c3342f7de649152f5c7043ad5d
parent07d4eb06d6f9ef1bb8c3666a1aaa7297eae59f17 (diff)
core: fix segfault in compile_bind_mounts() when BindPaths= or BindReadOnlyPaths= is setsystemd/v235.8-1
This fixes a bug introduced by 6c47cd7d3bf35c8158a0737f34fe2c5dc95e72d6. Fixes #7055. (cherry picked from commit a8cabc612b16834260831a8163ae4b479b5c33a5)
-rw-r--r--src/core/execute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index c4dfac96d9..2453f84fbd 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2161,7 +2161,7 @@ static int compile_bind_mounts(
if (!bind_mounts)
return -ENOMEM;
- for (i = 0; context->n_bind_mounts; i++) {
+ for (i = 0; i < context->n_bind_mounts; i++) {
BindMount *item = context->bind_mounts + i;
char *s, *d;