diff options
-rw-r--r-- | util/mount.fuse.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/util/mount.fuse.c b/util/mount.fuse.c index b388f9e..6df8c03 100644 --- a/util/mount.fuse.c +++ b/util/mount.fuse.c @@ -185,14 +185,18 @@ int main(int argc, char *argv[]) options = add_option("suid", options); if (!type) { - type = xstrdup(source); - source = strchr(type, '#'); - if (source) - *source++ = '\0'; - - if (!type[0]) { - fprintf(stderr, "%s: empty filesystem type\n", - progname); + if (source) { + type = xstrdup(source); + source = strchr(type, '#'); + if (source) + *source++ = '\0'; + if (!type[0]) { + fprintf(stderr, "%s: empty filesystem type\n", + progname); + exit(1); + } + } else { + fprintf(stderr, "%s: empty source\n", progname); exit(1); } } |