Skip to content

Commit 64b827e

Browse files
committed
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.
1 parent 3f2ec81 commit 64b827e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unblob/handlers/filesystem/yaffs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# YAFFS_OBJECT_TYPE_DIRECTORY, YAFFS_OBJECT_TYPE_FILE
3434
BIG_ENDIAN_MAGICS = [0x00_00_00_01, 0x00_00_00_03]
3535

36-
VALID_PAGE_SIZES = [512, 1024, 2048, 4096, 8192, 16384]
36+
VALID_PAGE_SIZES = [512, 1024, 2048, 4096, 8192, 16384, 2032]
3737
VALID_SPARE_SIZES = [16, 32, 64, 128, 256, 512]
3838
YAFFS1_PAGE_SIZE = 512
3939
YAFFS1_SPARE_SIZE = 16

0 commit comments

Comments
 (0)