From 1178a7a80119246a81e7d509cbb621ab8cac2d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Sat, 11 Feb 2017 10:44:02 +0100 Subject: [PATCH] Fixed setting opening contexts for plugins The opening context was incorrectly passed to plugins by lowntfs-3g (contributed by Eric Biggers) --- src/lowntfs-3g.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index aa36d2ef..4faf4f11 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -1568,7 +1568,7 @@ static void ntfs_fuse_read(fuse_req_t req, fuse_ino_t ino, size_t size, REPARSE_POINT *reparse; struct open_file *of; - of = (struct open_file*)fi; + of = (struct open_file*)(long)fi->fh; res = CALL_REPARSE_PLUGIN(ni, read, buf, size, offset, &of->fi); if (res >= 0) { goto stamps; @@ -1649,7 +1649,7 @@ static void ntfs_fuse_write(fuse_req_t req, fuse_ino_t ino, const char *buf, REPARSE_POINT *reparse; struct open_file *of; - of = (struct open_file*)fi; + of = (struct open_file*)(long)fi->fh; res = CALL_REPARSE_PLUGIN(ni, write, buf, size, offset, &of->fi); if (res >= 0) {