summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZim <zezeozue@google.com>2020-03-27 09:29:08 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-27 09:29:08 +0000
commitedd737edd72c2b6eba6ee8797db2c45a5f7b965d (patch)
treecada9b2e1b49fb45f44493666bd195d44231888c
parent237c71124326a332f67135576204731a6dbebaeb (diff)
parent3a69a04fa62baddd397619eb78ea237eb4c0056d (diff)
Fix FUSE_CANONICAL_PATH response am: 3a69a04fa6
Change-Id: I3e597d4bdb29f55dbd48483875f4c98b6c976b16
-rw-r--r--lib/fuse_lowlevel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 334b497..fc76b7c 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -452,7 +452,9 @@ int fuse_reply_readlink(fuse_req_t req, const char *linkname)
int fuse_reply_canonical_path(fuse_req_t req, const char *path)
{
- return send_reply_ok(req, path, strlen(path));
+ // The kernel expects a buffer containing the null terminator for this op
+ // So we add the null terminator size to strlen
+ return send_reply_ok(req, path, strlen(path) + 1);
}
int fuse_reply_open(fuse_req_t req, const struct fuse_file_info *f)