Fix uninitialised read in fuse_new_30() (#231) (#234)
authorAshley Pittman <ashleypittman@users.noreply.github.com>
Fri, 9 Feb 2018 13:42:12 +0000 (13:42 +0000)
committerNikolaus Rath <Nikolaus@rath.org>
Fri, 9 Feb 2018 13:42:12 +0000 (13:42 +0000)
Ensure that conf is always zero before it's read from to prevent
sporadic failure at startup if higher layers were build against
version 3.0

Signed-off-by: Ashley Pittman <ashley.m.pittman@intel.com>
lib/fuse.c

index 56b863a4cb850360c45b2237a1b7bcb32a014760..2fb942ceb6759748dcd4a74a389df02922c035ea 100644 (file)
@@ -4842,6 +4842,9 @@ struct fuse *fuse_new_30(struct fuse_args *args,
                         size_t op_size, void *user_data)
 {
        struct fuse_config conf;
+
+       memset(&conf, 0, sizeof(conf));
+
        const struct fuse_opt opts[] = {
                FUSE_LIB_OPT("-h", show_help, 1),
                FUSE_LIB_OPT("--help", show_help, 1),