mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-16 15:44:04 +01:00
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);
|
||||
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 New Issue
Block a user