Replay: refuse a capture whose submissions name lists it does not hold (indexed out of bounds) #275
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!275
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-275"
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?
@sharan104 on GitHub · 2026-11-26 14:04 UTC · original
sharan104:fix/replay-read-bounds→main· +42 −0 · 1 files · 1 commits · openFrame::read(replay/wire.rs) took a submission's list numbers as they came. The callers then indexframe.listsdirectly:listing(play.rs)look::flowdiverge.rsSo a corrupt or truncated
frame.binnaming a list past the end madevictory replaypanic with an index out of bounds, instead of refusing the file the wayFrame::readalready does for other bad data.Fix:
Frame::readrefuses any list number that is neitherMISSINGnor insidelists, withBad("a submission of a list it does not hold"). The recorder only ever writes those two kinds, so captures it made still load.Test:
a_submission_of_a_list_not_there_is_refusedwrites a frame whose submission names[0, MISSING], which still reads, and one naming[0, 1]with a single list, which is refused. It fails with the check removed, and passed 10 runs out of 10 with it.Results:
--features diagnosticspass.-D warningsadds nothing beyond main's existingwatch.rslint, which #241 fixes.🤖 Generated with Claude Code
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.