From: Yu Watanabe Date: Wed, 11 Oct 2017 03:27:13 +0000 (+0900) Subject: core: fix segfault in compile_bind_mounts() when BindPaths= or BindReadOnlyPaths... X-Git-Tag: v236~334^2 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=a8cabc612b16834260831a8163ae4b479b5c33a5;p=systemd%2F.git core: fix segfault in compile_bind_mounts() when BindPaths= or BindReadOnlyPaths= is set This fixes a bug introduced by 6c47cd7d3bf35c8158a0737f34fe2c5dc95e72d6. Fixes #7055. --- diff --git a/src/core/execute.c b/src/core/execute.c index d7d2ce4947..e64afe8e9c 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;