From: Christian Brauner Date: Sat, 17 Feb 2018 18:44:21 +0000 (+0100) Subject: cgfsng: cgfsng_attach() X-Git-Tag: lxc-3.0.0.beta1~22^2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cb10e11f13d14bcdc3769b9327d8414cb0e942c;p=thirdparty%2Flxc.git cgfsng: cgfsng_attach() Signed-off-by: Christian Brauner --- 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++) {