Skip to content

Conversation

@qkaiser
Copy link
Contributor

@qkaiser qkaiser commented Feb 11, 2024

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:

  • a bzip chunk starting at offset 0 and ending before the DMG plist
  • a DMG chunk starting at offset 0 and ending after the DMG footer

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

Copy link
Contributor

@e3krisztian e3krisztian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

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:
- a bzip chunk starting at offset 0 and ending before the DMG plist
- a DMG chunk starting at offset 0 and ending after the DMG footer

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.
@qkaiser qkaiser enabled auto-merge February 13, 2024 10:01
@qkaiser qkaiser merged commit 2e6a7ae into main Feb 13, 2024
@qkaiser qkaiser deleted the 753-overlap-fix branch February 13, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error chunk has higher start_offset than end_offset with end_offset=0

3 participants