From 08268425d61bd2b08a31d5589a4e7f1a62ac333d Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sun, 21 Feb 2016 19:15:57 -0500 Subject: Properly initialize fuse_operations struct Prevent crashes on unimplemented functions by nulling out all function pointers in the struct. --- src/operations.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/operations.cc b/src/operations.cc index ad9f8f3..2bded60 100644 --- a/src/operations.cc +++ b/src/operations.cc @@ -198,6 +198,7 @@ fuse_operations FuseOperations(File* const root) { root_ = root; fuse_operations result; + std::memset(&result, 0, sizeof(result)); result.flag_nullpath_ok = true; result.flag_nopath = true; -- cgit v1.2.3