diff options
author | dg <dg@FreeBSD.org> | 1994-08-02 11:42:10 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-08-02 11:42:10 +0000 |
commit | 5ccbe6e80aba1c533cf923b4c3b270cfe7eb40eb (patch) | |
tree | be835a88aca54f216498d778013008f76e322421 /sbin/mount/mount.c | |
parent | 8d205697aac53476badf354623abd4e1c7bc5aff (diff) | |
download | FreeBSD-src-5ccbe6e80aba1c533cf923b4c3b270cfe7eb40eb.zip FreeBSD-src-5ccbe6e80aba1c533cf923b4c3b270cfe7eb40eb.tar.gz |
Fixed NULL pointer dereference that occured when any options were
specified.
Diffstat (limited to 'sbin/mount/mount.c')
-rw-r--r-- | sbin/mount/mount.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index f0ff782..d16b3d6 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/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; |