提交 373d5e71 编写于 作者: R Richard Purdie 提交者: Richard Purdie

JFFS2: Return an error for long filenames

Return an error if a name is too long for JFFS2 rather than
corrupting data.
Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
上级 6e62e8c2
......@@ -78,6 +78,9 @@ static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target,
D1(printk(KERN_DEBUG "jffs2_lookup()\n"));
if (target->d_name.len > JFFS2_MAX_NAME_LEN)
return ERR_PTR(-ENAMETOOLONG);
dir_f = JFFS2_INODE_INFO(dir_i);
c = JFFS2_SB_INFO(dir_i->i_sb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册