mirror of
https://github.com/opnsense/src.git
synced 2026-04-23 07:07:24 -04:00
Fixed NULL pointer dereference that occured when any options were
specified.
This commit is contained in:
parent
3c4dd3568f
commit
e05db2e2a5
2 changed files with 6 additions and 2 deletions
|
|
@ -261,11 +261,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
|
|||
warn("%s", mntpath);
|
||||
return (1);
|
||||
}
|
||||
if (mntopts == NULL)
|
||||
mntopts = "";
|
||||
|
||||
name = mntpath;
|
||||
|
||||
if (options == NULL) {
|
||||
if (mntopts == NULL || *mntopts == '\0')
|
||||
if (*mntopts == '\0')
|
||||
options = "rw";
|
||||
else
|
||||
options = mntopts;
|
||||
|
|
|
|||
|
|
@ -261,11 +261,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
|
|||
warn("%s", mntpath);
|
||||
return (1);
|
||||
}
|
||||
if (mntopts == NULL)
|
||||
mntopts = "";
|
||||
|
||||
name = mntpath;
|
||||
|
||||
if (options == NULL) {
|
||||
if (mntopts == NULL || *mntopts == '\0')
|
||||
if (*mntopts == '\0')
|
||||
options = "rw";
|
||||
else
|
||||
options = mntopts;
|
||||
|
|
|
|||
Loading…
Reference in a new issue