Commit 6ea8fb78 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

cgroup: Use snprintf in collect_cgroups

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 357aa793
...@@ -291,10 +291,10 @@ static int collect_cgroups(struct list_head *ctls) ...@@ -291,10 +291,10 @@ static int collect_cgroups(struct list_head *ctls)
if (strstartswith(cc->name, "name=")) { if (strstartswith(cc->name, "name=")) {
name = cc->name + 5; name = cc->name + 5;
sprintf(opts, "none,%s", cc->name); snprintf(opts, sizeof(opts), "none,%s", cc->name);
} else { } else {
name = cc->name; name = cc->name;
sprintf(opts, "%s", name); snprintf(opts, sizeof(opts), "%s", name);
} }
if (mkdtemp(prefix) == NULL) { if (mkdtemp(prefix) == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment