App: reject wrapping RVAs in VICTORY_WATCH #482
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!482
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-482"
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?
@enzoduarte1 on GitHub · 2026-11-24 03:55 UTC · original
enzoduarte1:app/watch-rva-overflow→main· +20 −5 · 1 files · 1 commits · openWhat
watch()parsed eachVICTORY_WATCHRVA as hex and checked it withrva + 4 <= size. On x86_64 a value likeffffffffffffffffwraps to3, passes the check, and makes the polling thread read atbase - 1instead of inside the image. The neighboringVICTORY_CRASH_SAVEparser already useschecked_add.The bounds check now uses
checked_add, and the parsing lives in awatch_rvashelper that can be tested without reading an image. The test covers a wrapping RVA and the normal accepted/rejected boundary.Tested
x86_64-pc-windows-gnu(no MSVC linker on this machine).cargo test -p victory --features diagnostics --bin victory run::: 2 passed.cargo test --workspace --exclude victory-loader -- --test-threads=1: all suites passed.cargo clippy -p victory --all-targets --features diagnostics -- -D warnings: clean here, apart from the pre-existingxmem.rswarning fixed by PR #355, which was allowed locally.rustfmt --edition 2024 --check apps/victory/src/run.rsandgit diff --check: clean.cargo xtask policy: 151 files ok. No game files or data taken from them were added.cargo test -p victory-loader --test load_probe. Its fixture passes MSVC's/DELAYLOADflag, which MinGW rejects here; the same failure occurs on unmodifiedmain.Checklist
cargo fmt,cargo clippy --workspace --all-targetsandcargo test --workspacepass — see the toolchain limitations above; the changed target is clean.cargo xtask policypasses. The change adds no game files or data taken from them (docs/asset-policy.md).@Marvisak on GitHub · 2026-11-25 00:20 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:apps/victory/src/run.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.