XMA: reject frame starts in packet headers #1797
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1797
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@VlREX on GitHub · 2026-11-24 22:45 UTC · original
VlREX:fix/xma-frame-payload-start→main· +25 −4 · 1 files · 2 commits · openNo description provided.
@Marvisak on GitHub · 2026-11-25 01:36 UTC · original · edited 2026-11-25 20:23 UTC
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
@catminou4 on GitHub · 2026-11-24 23:05 UTC · original · approved these changes
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.
@fuzeofficlal on GitHub · 2026-11-26 19:24 UTC · original · approved these changes
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.