From 0cb10e11f13d14bcdc3769b9327d8414cb0e942c 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 c0edd5cc3..07fa6b7db 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2495,7 +2495,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++) {