xma: stop at a zero-length frame instead of looping forever #14
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14"
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 9hvn9yt2vk-netizen on 2026-11-23T23:02:01Z.
next_frame walks the frames before
startto learn whether the frame atstartis the packet's last. A damaged packet whose earlier frame has a length of 0 never advancedat, so the walk spun forever (in a debug build it overflowednumberafter about 4 billion rounds and panicked).Apply the rule read_frame already uses: a length that does not cover its own 15-bit field is not a frame, and the search ends.
Found with a random-input harness. The new test hangs without the fix and passes at once with it.