aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/readinode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/readinode.c')
-rw-r--r--fs/jffs2/readinode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index e6076fa5560f..12a3aaeb2f7e 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: readinode.c,v 1.137 2005/08/03 09:26:46 dedekind Exp $ 10 * $Id: readinode.c,v 1.138 2005/08/03 09:28:06 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -278,7 +278,7 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
278 278
279 /* If we actually calculated the whole data CRC 279 /* If we actually calculated the whole data CRC
280 * and it is wrong, drop the node. */ 280 * and it is wrong, drop the node. */
281 if (len == csize && unlikely(tn->partial_crc != je32_to_cpu(rd->data_crc))) { 281 if (len >= csize && unlikely(tn->partial_crc != je32_to_cpu(rd->data_crc))) {
282 JFFS2_NOTICE("wrong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n", 282 JFFS2_NOTICE("wrong data CRC in data node at 0x%08x: read %#08x, calculated %#08x.\n",
283 ref_offset(ref), tn->partial_crc, je32_to_cpu(rd->data_crc)); 283 ref_offset(ref), tn->partial_crc, je32_to_cpu(rd->data_crc));
284 goto free_out; 284 goto free_out;