diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-03-26 16:46:38 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-07-22 06:31:23 +0200 |
commit | 4e8f86d4d6de46cb2404eab37268c3b53308cb3a (patch) | |
tree | 42cb84f0b33421b35471572648df4d2d324f54ca | |
parent | c92fecbb511ef62c85a2047ca49a234c422440c1 (diff) | |
download | fuse-4e8f86d4d6de46cb2404eab37268c3b53308cb3a.tar.gz |
Initilaize stat buffer passed to ->getattr() and ->fgetattr()
to zero in all cases.
Reported by Daniel Iwan.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/fuse.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -10,6 +10,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 @@ -2396,6 +2396,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; @@ -2769,6 +2770,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); |