From: Nikolaus Rath Date: Fri, 23 Nov 2018 17:12:43 +0000 (+0000) Subject: Don't segfault when called with -h. X-Git-Tag: fuse-3.4.1~5 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=59dc22b12f323aee41315ff82f358482f78bfd5f;p=qemu-gpiodev%2Flibfuse.git Don't segfault when called with -h. Fixes: #327 --- diff --git a/example/hello.c b/example/hello.c index 57d3ecd..f307bf2 100644 --- a/example/hello.c +++ b/example/hello.c @@ -170,7 +170,7 @@ int main(int argc, char *argv[]) if (options.show_help) { show_help(argv[0]); assert(fuse_opt_add_arg(&args, "--help") == 0); - args.argv[0] = (char*) ""; + args.argv[0][0] = '\0'; } ret = fuse_main(args.argc, args.argv, &hello_oper, NULL);