aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-21 19:15:57 -0500
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-21 20:38:02 -0500
commit08268425d61bd2b08a31d5589a4e7f1a62ac333d (patch)
treea76308645d54f40013721c92acf3e1077b9dc9e2
parentae657efd38d9fcf21b9fddc83c83d095e4f284b7 (diff)
Properly initialize fuse_operations struct
Prevent crashes on unimplemented functions by nulling out all function pointers in the struct.
-rw-r--r--src/operations.cc1
1 files changed, 1 insertions, 0 deletions
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;