onekey-sec / unblob

Extract files from any kind of container formats
https://unblob.org
Other
2.11k stars 80 forks source link

fix(models): adapt chunk's contains() definition. #755

Closed qkaiser closed 5 months ago

qkaiser commented 5 months ago

We were considering that a chunk A contains a chunk B if chunk B start after chunk A and ends before or on the same offset than chunk A.

This caused issues with compressed DMG images where two handlers would rightfully identify two chunks:

We therefore adapted our definition of contains() where a contained chunk can start at the same offset but ends before, or start after the containing chunk but can end on the same offset.

Resolve #753