cgroup: Use snprintf in collect_cgroups

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2014-07-21 14:47:05 +04:00 committed by Pavel Emelyanov
parent 357aa793d2
commit 6ea8fb78a3

View file

@ -291,10 +291,10 @@ static int collect_cgroups(struct list_head *ctls)
if (strstartswith(cc->name, "name=")) {
name = cc->name + 5;
sprintf(opts, "none,%s", cc->name);
snprintf(opts, sizeof(opts), "none,%s", cc->name);
} else {
name = cc->name;
sprintf(opts, "%s", name);
snprintf(opts, sizeof(opts), "%s", name);
}
if (mkdtemp(prefix) == NULL) {