]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: cgfsng_attach()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 18:44:21 +0000 (19:44 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Feb 2018 14:48:46 +0000 (15:48 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index db799877ffcf21df3843f50c5ed8427db6c2ec3c..2b6874865a26cf48dd4d40e109b6a65ef8bc76e7 100644 (file)
@@ -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++) {