mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
sysfs_parse: use xsprintf() in fixup_aufs_vma_fd()
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
7dd377ef0f
commit
a7e8769de3
1 changed files with 2 additions and 3 deletions
|
|
@ -291,11 +291,10 @@ int fixup_aufs_vma_fd(struct vma_area *vma)
|
|||
|
||||
strcpy(vma->aufs_rpath, path);
|
||||
if (opts.root) {
|
||||
vma->aufs_fpath = xmalloc(strlen(opts.root) + 1 + len + 1);
|
||||
/* skip ./ in path */
|
||||
vma->aufs_fpath = xsprintf("%s/%s", opts.root, &path[2]);
|
||||
if (!vma->aufs_fpath)
|
||||
return -1;
|
||||
/* skip ./ in path */
|
||||
sprintf(vma->aufs_fpath, "%s/%s", opts.root, &path[2]);
|
||||
}
|
||||
pr_debug("Saved AUFS paths %s and %s\n", vma->aufs_rpath, vma->aufs_fpath);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue