aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-03-26 16:46:38 +0100
committerDan Pasanen <dan.pasanen@gmail.com>2015-10-28 21:00:16 -0500
commit1a82d78d098af16f4bc8694e09957336bc589341 (patch)
treec50843e1916905dfe040cde400b98818bb082516
parentcae1f7e2dd6c3f4e68defc268303b59af623978f (diff)
downloadandroid_external_fuse-1a82d78d098af16f4bc8694e09957336bc589341.tar.gz
android_external_fuse-1a82d78d098af16f4bc8694e09957336bc589341.tar.bz2
android_external_fuse-1a82d78d098af16f4bc8694e09957336bc589341.zip
Initilaize stat buffer passed to ->getattr() and ->fgetattr()
to zero in all cases. Reported by Daniel Iwan. Change-Id: I5f2c14a2fbaffeac3378cedbad8b04274931f26c
-rw-r--r--ChangeLog5
-rw-r--r--lib/fuse.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f4657a0..01ec2dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@
result in EINVAL when mounting the filesystem. This also needs a
fix in the kernel.
+2014-03-26 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Initilaize stat buffer passed to ->getattr() and ->fgetattr() to
+ zero in all cases. Reported by Daniel Iwan
+
2013-08-26 Miklos Szeredi <miklos@szeredi.hu>
* libfuse: Add missing includes. This allows compiling fuse with
diff --git a/lib/fuse.c b/lib/fuse.c
index 5f2be03..d214b36 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -2402,6 +2402,7 @@ static char *hidden_name(struct fuse *f, fuse_ino_t dir, const char *oldname,
if (res)
break;
+ memset(&buf, 0, sizeof(buf));
res = fuse_fs_getattr(f->fs, newpath, &buf);
if (res == -ENOENT)
break;
@@ -2777,6 +2778,7 @@ static void fuse_lib_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr,
char *path;
int err;
+ memset(&buf, 0, sizeof(buf));
if (valid == FUSE_SET_ATTR_SIZE && fi != NULL &&
f->fs->op.ftruncate && f->fs->op.fgetattr)
err = get_path_nullok(f, ino, &path);