libcgroup/fix_overflow.patch

14 lines
456 B
Diff
Raw Normal View History

Index: v0.31/api.c
===================================================================
--- v0.31.orig/api.c 2008-09-05 19:52:44.000000000 +0530
+++ v0.31/api.c 2008-09-05 20:06:53.000000000 +0530
@@ -1041,7 +1041,7 @@ struct cgroup *cgroup_get_cgroup(struct
cg_mount_table[i].name))
continue;
- strncat(path, cgroup->name, sizeof(path));
+ strncat(path, cgroup->name, sizeof(path) - strlen(path));
if (access(path, F_OK))
continue;