From 64b827eba2e2891a433bbdbe70562c83cb8bc503 Mon Sep 17 00:00:00 2001 From: Marton ILLES Date: Tue, 17 Sep 2024 18:52:37 +0200 Subject: [PATCH] fix(yaffs): extend potential page size list to include 2032 bytes In a sample we see a page_size with 2032 bytes and 16 bytes spare. Apparently the sum of page+spare is 2048 bytes. As we have many checks to see if a page_size is indeed valid and calculate also spare size, having an additional potential page size should not cause any problem. As page sizes are tested in the order specified, this new and unlikely case added to the end not to slow down other extractions. --- unblob/handlers/filesystem/yaffs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unblob/handlers/filesystem/yaffs.py b/unblob/handlers/filesystem/yaffs.py index d9e71a22d0..bde200f24a 100644 --- a/unblob/handlers/filesystem/yaffs.py +++ b/unblob/handlers/filesystem/yaffs.py @@ -33,7 +33,7 @@ # YAFFS_OBJECT_TYPE_DIRECTORY, YAFFS_OBJECT_TYPE_FILE BIG_ENDIAN_MAGICS = [0x00_00_00_01, 0x00_00_00_03] -VALID_PAGE_SIZES = [512, 1024, 2048, 4096, 8192, 16384] +VALID_PAGE_SIZES = [512, 1024, 2048, 4096, 8192, 16384, 2032] VALID_SPARE_SIZES = [16, 32, 64, 128, 256, 512] YAFFS1_PAGE_SIZE = 512 YAFFS1_SPARE_SIZE = 16