Skip to content

Commit

Permalink
Merge pull request #4161 from srd424/patch-1
Browse files Browse the repository at this point in the history
Fix errors constructing mount string when extra mount options supplied
  • Loading branch information
Christian Brauner committed Jul 4, 2022
2 parents cf1f3bc + 3d360cf commit 890d0da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/storage/overlay.c
Expand Up @@ -445,10 +445,10 @@ int ovl_mount(struct lxc_storage *bdev)
upper, lower, mntdata);

len2 = strlen(lower) + strlen(upper) + strlen(work) +
strlen("upperdir=,lowerdir=,workdir=") +
strlen("upperdir=,lowerdir=,workdir=,") +
strlen(mntdata) + 1;
options_work = must_realloc(NULL, len2);
ret2 = snprintf(options, len2,
ret2 = snprintf(options_work, len2,
"upperdir=%s,lowerdir=%s,workdir=%s,%s", upper,
lower, work, mntdata);
} else {
Expand Down

0 comments on commit 890d0da

Please sign in to comment.