]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix segfault in compile_bind_mounts() when BindPaths= or BindReadOnlyPaths... 7058/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 11 Oct 2017 03:27:13 +0000 (12:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 11 Oct 2017 03:28:22 +0000 (12:28 +0900)
This fixes a bug introduced by 6c47cd7d3bf35c8158a0737f34fe2c5dc95e72d6.

Fixes #7055.

src/core/execute.c

index d7d2ce4947984ba639c9651c26ebc8d79ab07e73..e64afe8e9c7faab7427b0defb0279616ba21dcfa 100644 (file)
@@ -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;