--- e3421030a69f713971a78e7d5d525098a4e44416 +++ 91e656fd528b82e74bda7520ee8c113da52dda70 @@ -128,7 +128,7 @@ static void *ocfs2_fast_follow_link(stru } /* 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;