Commit 0d491108 authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 77f89022 1fc8a117
...@@ -128,7 +128,7 @@ static void *ocfs2_fast_follow_link(struct dentry *dentry, ...@@ -128,7 +128,7 @@ static void *ocfs2_fast_follow_link(struct dentry *dentry,
} }
/* Fast symlinks can't be large */ /* 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); link = kzalloc(len + 1, GFP_NOFS);
if (!link) { if (!link) {
status = -ENOMEM; status = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment