From eeb0f17a7a2280ec4f20b46ec40a4997f1b7d2e7 Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Tue, 20 Mar 2012 20:47:37 +1300 Subject: [PATCH] Fix summary header validation Was not checking the byte count correctly. Signed-off-by: Charles Manning --- yaffs_summary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaffs_summary.c b/yaffs_summary.c index 49eaef1..20b27d8 100644 --- a/yaffs_summary.c +++ b/yaffs_summary.c @@ -214,7 +214,7 @@ int yaffs_summary_read(struct yaffs_dev *dev, tags.obj_id != YAFFS_OBJECTID_SUMMARY || tags.chunk_used == 0 || tags.ecc_result > YAFFS_ECC_RESULT_FIXED || - this_tx != tags.n_bytes) + tags.n_bytes != (this_tx + sizeof(hdr))) result = YAFFS_FAIL; if (result != YAFFS_OK) break; -- 2.30.2