Don't crash if mountpoint is not specified.
authorNikolaus Rath <Nikolaus@rath.org>
Fri, 9 Nov 2018 10:45:27 +0000 (10:45 +0000)
committerNikolaus Rath <Nikolaus@rath.org>
Fri, 9 Nov 2018 10:45:27 +0000 (10:45 +0000)
Fixes: #319.
example/passthrough_ll.c

index db4a3f3a49f9547576d91bf25c98fceff57edb12..40913956a66696e64980dd8f6b971d6804cca800 100644 (file)
@@ -1189,6 +1189,13 @@ int main(int argc, char *argv[])
                goto err_out1;
        }
 
+       if(opts.mountpoint == NULL) {
+               printf("usage: %s [options] <mountpoint>\n", argv[0]);
+               printf("       %s --help\n", argv[0]);
+               ret = 1;
+               goto err_out1;
+       }
+
        if (fuse_opt_parse(&args, &lo, lo_opts, NULL)== -1)
                return 1;