XMA: reject frame starts in packet headers #1796
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1797"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-24T22:45:12Z.
No description provided.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:05:47Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae).cargo test -p victory-formats --locked → 24 passed, 0 failed. frame_starts_must_be_inside_packet_payloads: XMA frame-start validation tightened to packet payloads — small, correct-looking.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:36:29Z.
Automated triage for the maintainers.
Merge candidate. The new commit
673efe6follows the previous review's suggestion. It drops the rejection of frame starts inside a packet header fromread_frame(crates/victory-formats/src/xma.rs), along with its test, so a start at a packet boundary is again stepped over byCursoras onmain. What remains is the padding-marker fix:next_frame's walk from the packet's first frame now stops at a0x7ffflength, the same ruleread_framealready applies. Onmainthe walk would add 32767 bits, overshootstart, and count a frame that isn't there.Tests:
padding_marker_before_start_ends_the_searchgivesnext == Nonehere. Onmain, reading the same data jumps to the next packet, so the test tells the two versions apart.truncated_frame_and_out_of_range_starts_are_rejectedpins behaviourCursoralready has.This only matters for streams where a padding marker comes before a frame start in the same packet, which is damaged data. One thing before merging: the PR title still says "reject frame starts in packet headers", which no longer describes the change. Please retitle it, for example "XMA: the frame walk stops at the padding marker".
CI: passing.
Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T19:24:08Z.
Review: APPROVED
Verified locally merged onto
origin/main(63bcca43, Windows 11 x64, Rust 1.98.1 MSVC):cargo test --locked -p victory-formats xma— 22 passed, 0 failed, 3 ignored (includingpadding_marker_before_start_ends_the_searchandtruncated_frame_and_out_of_range_starts_are_rejected)cargo clippy --locked -p victory-formats --all-targets -- -D warnings(default and--all-features) — 0 warningscargo xtask policy— ok (191 files ok)Review notes
673efe6cleanly stopsnext_frameon the0x7fffframe-length padding marker (crates/victory-formats/src/xma.rs:165) without rejecting valid payload-relativeFrameOffsetInBitsoffsets (0..=31) or0x7fffno-start packet headers.673efe6removed that check.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.