Skip to content

Return an error for truncated subs codec parameters - #220

Merged
kixelated merged 1 commit into
mainfrom
codex/issue-179-subs
Jul 18, 2026
Merged

Return an error for truncated subs codec parameters#220
kixelated merged 1 commit into
mainfrom
codex/issue-179-subs

Conversation

@kixelated

Copy link
Copy Markdown
Owner

Split from #199. Refs #179.

What changed

  • Decode the four-byte subs codec-specific parameters through the checked decoding path.
  • Add a regression test for a three-byte truncated value.

Why

The previous decoder sliced and advanced four bytes without first verifying that four bytes remained, so malformed input could panic.

Impact

Truncated subs data now returns Error::OutOfBounds; valid decoding is unchanged.

Validation

  • cargo fmt --all -- --check
  • cargo test --all-features (251 unit tests and 3 doctests passed)
  • cargo clippy --all-targets --all-features -- -D warnings
  • git diff --check main...HEAD

@kixelated
kixelated marked this pull request as ready for review July 18, 2026 21:02
@kixelated
kixelated merged commit a1c24ff into main Jul 18, 2026
1 check passed
@kixelated
kixelated deleted the codex/issue-179-subs branch July 18, 2026 21:02
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kixelated, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 371ed0af-3f1e-44c0-ab3a-70f4c426ecbe

📥 Commits

Reviewing files that changed from the base of the PR and between 2a28308 and c9b0001.

📒 Files selected for processing (1)
  • src/moov/trak/mdia/minf/stbl/subs.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/issue-179-subs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot mentioned this pull request Jul 18, 2026
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.

1 participant