loader: make the game patch range check overflow-safe #1349
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1349
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1349/head"
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?
@HamsterCL on GitHub · 2026-10-10 02:41 UTC · original
HamsterCL:fix/gamepatch-range-overflow→main· +5 −2 · 1 files · 1 commits · closed without mergingIsInsideProgramcomputedaddress + sizeandbase_vaddr + mapped_size, which can wrap and wrongly report a range as inside the program. It now compares against the remaining mapped size, so nothing can overflow.Split out of the closed #1329 as a one-file change. Built and ran the ctest suite locally on Windows (clang-cl). All pass except image_transfer_layout, which also fails on current main without this change.
@coderabbitai[bot] on GitHub · 2026-10-10 02:45 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
87c59edb-e064-4d9f-bcec-ae4117bea3fa📥 Commits
Reviewing files that changed from the base of the PR and between
679be25c37anda1b18fefc0.📒 Files selected for processing (1)
src/loader/gamePatch.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
📝 Walkthrough
Walkthrough
IsInsideProgramnow rejects zero-sized ranges and addresses belowbase_vaddr. It checks the remaining range againstmapped_sizeusing a base-relative offset and subtraction-based bounds checks.Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
a1b18The change checks program ranges without relying on potentially overflowing endpoint additions. No actionable merge-blocking risk is established.
Pre-merge checks |
4 |
1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
#1329is closed and provides historical context only. No active directly linked issue supplies coding requirements. The reviewed change matches the current PR intent to makeIsInsideProgramra…src/loader/gamePatch.cpp. The change rejects zero-sized and below-base ranges, then checks the offset and size againstmapped_sizewithout computing overflowing end a…Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.Pull request closed