Skip to content

Commit

Permalink
cgfsng: cgfsng_attach()
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 21, 2018
1 parent 8f975b9 commit 7c625b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/cgroups/cgfsng.c
Expand Up @@ -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++) {
Expand Down

0 comments on commit 7c625b5

Please sign in to comment.