summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-24 09:14:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-24 09:14:42 -0700
commit051732bcbe3cff3fea04dc9042266562fe8b0859 (patch)
tree1c709cd8a65747fde8363ce593b77e040c14e3e4 /fs/fuse/dev.c
parent2983573e491d1e201e802eafa3553ba33d1fd50b (diff)
parentc2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae (diff)
downloadlinux-051732bcbe3cff3fea04dc9042266562fe8b0859.tar.bz2
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message fuse: mark pages accessed when written to fuse: delete dead .write_begin and .write_end aops fuse: fix flock fuse: fix non-ANSI void function notation
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 640fc229df10..168a80f7f12b 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1358,6 +1358,10 @@ static int fuse_notify_inval_entry(struct fuse_conn *fc, unsigned int size,
if (outarg.namelen > FUSE_NAME_MAX)
goto err;
+ err = -EINVAL;
+ if (size != sizeof(outarg) + outarg.namelen + 1)
+ goto err;
+
name.name = buf;
name.len = outarg.namelen;
err = fuse_copy_one(cs, buf, outarg.namelen + 1);