Skip to content

fix(tutk): guard Session16 frame reassembly bounds - #2433

Merged
AlexxIT merged 2 commits into
AlexxIT:masterfrom
Ray8876:fix/tutk-session16-frame-bounds
Nov 28, 2026
Merged

AlexxIT merged 2 commits into
AlexxIT:masterfrom
Ray8876:fix/tutk-session16-frame-bounds

Conversation

@Ray8876

@Ray8876 Ray8876 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Closes the accompanying malformed Session16 frame-packet issue.

  • validate Session16 command/header lengths before indexing
  • validate fragment payload and header sizes against the assembled buffer before slicing
  • discard inconsistent frames as media loss
  • add a regression test for a payload declaration beyond the assembled buffer

Tested: go test ./pkg/tutk ./pkg/h265 ./pkg/xiaomi/miss/...

@AlexxIT AlexxIT self-assigned this Oct 2, 2026
@AlexxIT AlexxIT added kind/feature Proposes or implements a new capability or enhancement brand/xiaomi Xiaomi and Mijia cameras and doorbells size/S PR with 10-29 lines changed, excluding generated files. labels Oct 2, 2026
@AlexxIT AlexxIT added kind/bug Reports a defect or fixes one and removed kind/feature Proposes or implements a new capability or enhancement labels Nov 25, 2026 — with ChatGPT Codex Connector
@AlexxIT AlexxIT added size/M PR with 30-99 lines changed, excluding generated files. and removed size/S PR with 10-29 lines changed, excluding generated files. labels Nov 26, 2026
@AlexxIT
AlexxIT merged commit f8851a8 into AlexxIT:master Nov 28, 2026
1 check passed
@AlexxIT

AlexxIT commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Thanks! I've made a few minor improvements to your implementation.

@AlexxIT AlexxIT added this to the master milestone Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

brand/xiaomi Xiaomi and Mijia cameras and doorbells kind/bug Reports a defect or fixes one size/M PR with 30-99 lines changed, excluding generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants