Skip to content

Commit eb1930f

Browse files
committed
fix(handler): introduce upper size limit for s_log_block_size
The maximum block size limit on a 64bit system is 65536 When creating a fake filesystem with `mkfs.ext4` and setting the block size to -b 65536, the maximum value that s_log_block_size will reach is six.
1 parent 0dc4bb5 commit eb1930f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

unblob/handlers/filesystem/extfs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def valid_header(self, header) -> bool:
8484
"ExtFS header major version too high", rev_level=header.s_rev_level
8585
)
8686
return False
87+
if header.s_log_block_size > 6:
88+
return False
8789
return True
8890

8991
def calculate_chunk(self, file: File, start_offset: int) -> Optional[ValidChunk]:

0 commit comments

Comments
 (0)