From 7c625b530963e4e1624899bf5a9e2eb2814de8c4 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 17 Feb 2018 19:44:21 +0100 Subject: [PATCH] cgfsng: cgfsng_attach() Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index db799877f..2b6874865 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2473,7 +2473,7 @@ static bool cgfsng_attach(const char *name, const char *lxcpath, pid_t pid) char pidstr[25]; len = snprintf(pidstr, 25, "%d", pid); - if (len < 0 || len > 25) + if (len < 0 || len >= 25) return false; for (i = 0; hierarchies[i]; i++) { -- 2.47.2