mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 10:09:57 +00:00
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:
parent
357aa793d2
commit
6ea8fb78a3
1 changed files with 2 additions and 2 deletions
4
cgroup.c
4
cgroup.c
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue