diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2018-04-13 04:52:19 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-04-13 04:52:18 -0700 |
commit | 4ca97c41f12884bc6644ad00f5334466ce98b82a (patch) | |
tree | cdafe3977292d2734327074a4693eb99ba08a90b /fs | |
parent | 7c5a58c945e6cfb762653b4a607b87d66c8a5fe9 (diff) | |
parent | ba869c9422b8dfd6d47beeb15026be2f2022d7e7 (diff) |
Merge "ANDROID: fuse: Add null terminator to path in canonical path to avoid issue"
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/dev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index ca7d46de5ca3..028f38f0906c 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1947,8 +1947,10 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud, err = copy_out_args(cs, &req->out, nbytes); if (req->in.h.opcode == FUSE_CANONICAL_PATH) { - req->out.h.error = kern_path((char *)req->out.args[0].value, 0, - req->canonical_path); + char *path = (char *)req->out.args[0].value; + + path[req->out.args[0].size - 1] = 0; + req->out.h.error = kern_path(path, 0, req->canonical_path); } fuse_copy_finish(cs); |