Fixed NULL pointer dereference that occured when any options were
specified.
This commit is contained in:
parent
3c4dd3568f
commit
e05db2e2a5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1818
@ -261,11 +261,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
|
|||||||
warn("%s", mntpath);
|
warn("%s", mntpath);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
if (mntopts == NULL)
|
||||||
|
mntopts = "";
|
||||||
|
|
||||||
name = mntpath;
|
name = mntpath;
|
||||||
|
|
||||||
if (options == NULL) {
|
if (options == NULL) {
|
||||||
if (mntopts == NULL || *mntopts == '\0')
|
if (*mntopts == '\0')
|
||||||
options = "rw";
|
options = "rw";
|
||||||
else
|
else
|
||||||
options = mntopts;
|
options = mntopts;
|
||||||
|
@ -261,11 +261,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
|
|||||||
warn("%s", mntpath);
|
warn("%s", mntpath);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
if (mntopts == NULL)
|
||||||
|
mntopts = "";
|
||||||
|
|
||||||
name = mntpath;
|
name = mntpath;
|
||||||
|
|
||||||
if (options == NULL) {
|
if (options == NULL) {
|
||||||
if (mntopts == NULL || *mntopts == '\0')
|
if (*mntopts == '\0')
|
||||||
options = "rw";
|
options = "rw";
|
||||||
else
|
else
|
||||||
options = mntopts;
|
options = mntopts;
|
||||||
|
Loading…
Reference in New Issue
Block a user