mtd/fs/jffs2 nodelist.c,1.78,1.79
David Woodhouse
dwmw2 at infradead.org
Tue Apr 8 04:20:04 EDT 2003
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv11938
Modified Files:
nodelist.c
Log Message:
Fix the node sanity checks for device nodes, which have offset+dsize > isize
Index: nodelist.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodelist.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- nodelist.c 28 Mar 2003 14:52:12 -0000 1.78
+++ nodelist.c 8 Apr 2003 08:20:01 -0000 1.79
@@ -259,7 +259,7 @@
}
/* sanity checks */
- if ( je32_to_cpu(node.i.offset) + je32_to_cpu(node.i.dsize) > je32_to_cpu(node.i.isize) ||
+ if ( je32_to_cpu(node.i.offset) > je32_to_cpu(node.i.isize) ||
PAD(je32_to_cpu(node.i.csize) + sizeof (node.i)) != PAD(je32_to_cpu(node.i.totlen))) {
printk(KERN_NOTICE "jffs2_get_inode_nodes(): Inode corrupted at 0x%08x, totlen %d, #ino %d, version %d, isize %d, csize %d, dsize %d \n",
ref_offset(ref), je32_to_cpu(node.i.totlen), je32_to_cpu(node.i.ino),
More information about the linux-mtd-cvs
mailing list