Skip to content

Fix sgpd entry boundaries and v3 encoding invariants - #202

Draft
kixelated wants to merge 1 commit into
mainfrom
codex/fix-sgpd-entry-boundaries
Draft

Fix sgpd entry boundaries and v3 encoding invariants#202
kixelated wants to merge 1 commit into
mainfrom
codex/fix-sgpd-entry-boundaries

Conversation

@kixelated

Copy link
Copy Markdown
Owner

Closes #190.

What changed

  • Decode unknown sample-group entries using their declared description_length, preserving boundaries between multiple entries.
  • Require the default fields mandated by the selected v2/v3 sgpd encoding instead of emitting a malformed box.
  • Add regression coverage for multiple unknown entries and incomplete essential/v3 values.

Root cause and impact

Unknown grouping types previously decoded the entire remaining box payload into the first entry, corrupting the parsed entry structure. Separately, setting essential without v3 defaults selected version 3 but omitted required fields, producing bytes the decoder could not read back.

Validation

  • just check
  • just test (238 tests passed)
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sgpd: unknown grouping types ignore description_length; essential without defaults encodes an undecodable v3 box

1 participant