mtd/fs/jffs2 dir.c,1.90,1.91
rpurdie at infradead.org
rpurdie at infradead.org
Mon Apr 17 20:09:38 EDT 2006
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv31297/fs/jffs2
Modified Files:
dir.c
Log Message:
Return an error if a name is too long for JFFS2 rather than corrupting data.
Index: dir.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/dir.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- dir.c 7 Nov 2005 11:14:39 -0000 1.90
+++ dir.c 18 Apr 2006 00:09:35 -0000 1.91
@@ -78,6 +78,9 @@
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);
More information about the linux-mtd-cvs
mailing list