summaryrefslogtreecommitdiffstats
path: root/sbin/mount_ifs/mount.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-02 11:42:10 +0000
committerdg <dg@FreeBSD.org>1994-08-02 11:42:10 +0000
commit5ccbe6e80aba1c533cf923b4c3b270cfe7eb40eb (patch)
treebe835a88aca54f216498d778013008f76e322421 /sbin/mount_ifs/mount.c
parent8d205697aac53476badf354623abd4e1c7bc5aff (diff)
downloadFreeBSD-src-5ccbe6e80aba1c533cf923b4c3b270cfe7eb40eb.zip
FreeBSD-src-5ccbe6e80aba1c533cf923b4c3b270cfe7eb40eb.tar.gz
Fixed NULL pointer dereference that occured when any options were
specified.
Diffstat (limited to 'sbin/mount_ifs/mount.c')
-rw-r--r--sbin/mount_ifs/mount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c
index f0ff782..d16b3d6 100644
--- a/sbin/mount_ifs/mount.c
+++ b/sbin/mount_ifs/mount.c
@@ -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;
OpenPOWER on IntegriCloud