]> git.proxmox.com Git - mirror_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>
Sat, 17 Feb 2018 18:44:21 +0000 (19:44 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index c0edd5cc3f84d4b57749c5b46b517aef28faf94f..07fa6b7db1eaf2454f063e08b621faee9d062915 100644 (file)
@@ -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++) {