summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-30 05:38:07 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-30 05:38:07 +0200
commit0d4911081ce201f3e44bc8b32ac0f862d1260332 (patch)
treee6071b5ec945d05c1083d375c40688b29460e97c /fs
parentMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/as... (diff)
parentocfs2: Don't walk off the end of fast symlinks. (diff)
downloadlinux-0d4911081ce201f3e44bc8b32ac0f862d1260332.tar.xz
linux-0d4911081ce201f3e44bc8b32ac0f862d1260332.zip
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: ocfs2: Don't walk off the end of fast symlinks.
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/symlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/symlink.c b/fs/ocfs2/symlink.c
index 32499d213fc4..9975457c981f 100644
--- a/fs/ocfs2/symlink.c
+++ b/fs/ocfs2/symlink.c
@@ -128,7 +128,7 @@ static void *ocfs2_fast_follow_link(struct dentry *dentry,
}
/* Fast symlinks can't be large */
- len = strlen(target);
+ len = strnlen(target, ocfs2_fast_symlink_chars(inode->i_sb));
link = kzalloc(len + 1, GFP_NOFS);
if (!link) {
status = -ENOMEM;