Unverified Commit ddd51bd1 by Stéphane Graber Committed by GitHub

Merge pull request #3846 from brauner/2021-05-19.fixes

conf: fix mount option parsing
parents e2e70bd5 380fcc08
...@@ -2110,7 +2110,7 @@ static int parse_vfs_attr(struct lxc_mount_options *opts, char *opt, size_t size ...@@ -2110,7 +2110,7 @@ static int parse_vfs_attr(struct lxc_mount_options *opts, char *opt, size_t size
static int parse_mount_attrs(struct lxc_mount_options *opts, const char *mntopts) static int parse_mount_attrs(struct lxc_mount_options *opts, const char *mntopts)
{ {
__do_free char *mntopts_new = NULL, *mntopts_dup = NULL; __do_free char *mntopts_new = NULL, *mntopts_dup = NULL;
char *mntopt_cur = NULL; char *end = NULL, *mntopt_cur = NULL;
int ret; int ret;
size_t size; size_t size;
...@@ -2130,8 +2130,6 @@ static int parse_mount_attrs(struct lxc_mount_options *opts, const char *mntopts ...@@ -2130,8 +2130,6 @@ static int parse_mount_attrs(struct lxc_mount_options *opts, const char *mntopts
return ret_errno(ENOMEM); return ret_errno(ENOMEM);
lxc_iterate_parts(mntopt_cur, mntopts_dup, ",") { lxc_iterate_parts(mntopt_cur, mntopts_dup, ",") {
char *end = NULL;
/* This is a filesystem specific option. */ /* This is a filesystem specific option. */
if (strchr(mntopt_cur, '=')) { if (strchr(mntopt_cur, '=')) {
if (!end) { if (!end) {
......
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