-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(handlers): rely on pyfatfs to compute FAT images end offset
Some FAT samples that we have are truncated to match exactly the size of reserved sectors + FAT sectors + active cluster sectors. It's like the initial image minus the free clusters. We switched our approach for end offset calculation by simply calculating the offset of the highest cluster within the filesystem. The end offset corresponds to the offset of that cluster + the size of the file located there. Parsing is performed by pyfatfs, which implements similar structure validation so whenever an error raised we yield an InvalidInputFormat.
- Loading branch information
Showing
23 changed files
with
94 additions
and
308 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
tests/integration/filesystem/fat/fat12/__input__/cherry.truncated.fat12
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
tests/integration/filesystem/fat/fat12/__output__/cherry.truncated.fat12_extract/0-28160.fat
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat12/__output__/cherry.truncated.fat12_extract/0-28160.fat_extract/cherry1.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat12/__output__/cherry.truncated.fat12_extract/0-28160.fat_extract/cherry2.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat12/__output__/cherry.truncated.fat12_extract/0-28160.fat_extract/cherry3.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat12/__output__/cherry.truncated.fat12_extract/0-28160.fat_extract/cherry4.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ration/filesystem/fat/fat12/__output__/cherry.truncated.fat12_extract/28160-32768.unknown
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
tests/integration/filesystem/fat/fat16/__input__/banana.truncated.fat16
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
tests/integration/filesystem/fat/fat16/__output__/banana.truncated.fat16_extract/0-28160.fat
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat16/__output__/banana.truncated.fat16_extract/0-28160.fat_extract/banana1.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat16/__output__/banana.truncated.fat16_extract/0-28160.fat_extract/banana2.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat16/__output__/banana.truncated.fat16_extract/0-28160.fat_extract/banana3.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ystem/fat/fat16/__output__/banana.truncated.fat16_extract/0-28160.fat_extract/banana4.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ration/filesystem/fat/fat16/__output__/banana.truncated.fat16_extract/28160-32768.unknown
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
tests/integration/filesystem/fat/fat32/__input__/banana.truncated.fat32
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...s/integration/filesystem/fat/fat32/__output__/banana.truncated.fat32_extract/0-551424.fat
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...stem/fat/fat32/__output__/banana.truncated.fat32_extract/0-551424.fat_extract/banana1.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...stem/fat/fat32/__output__/banana.truncated.fat32_extract/0-551424.fat_extract/banana2.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...stem/fat/fat32/__output__/banana.truncated.fat32_extract/0-551424.fat_extract/banana3.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...stem/fat/fat32/__output__/banana.truncated.fat32_extract/0-551424.fat_extract/banana4.txt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
...ion/filesystem/fat/fat32/__output__/banana.truncated.fat32_extract/551424-2097152.unknown
Git LFS file not shown
Oops, something went wrong.