ajm: reject split buffers whose total size overflows #1348
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!1348
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1348/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/ajm-split-buffer-overflow→main· +10 −0 · 1 files · 1 commits · closed without mergingAjmDecodeSplitInstanceadds up the guest-supplied input and output buffer sizes in asize_t. A wrapped sum makes the later size checks and copies use the wrong total. It now returnsAJM_RESULT_INVALID_PARAMETERif either addition overflows.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:43 UTC · original
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
f5400476-7f00-4132-96f8-3ceda01e4290📥 Commits
Reviewing files that changed from the base of the PR and between
679be25c37andfad25e126c.📒 Files selected for processing (1)
src/libs/ajm.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.
📝 Walkthrough
Walkthrough
AjmDecodeSplitInstancenow checks for unsigned overflow while summing input and output buffer sizes. If either total wraps, it returnsAJM_RESULT_INVALID_PARAMETERbefore buffer allocation or copying. Otherwise, the existing split-buffer decode flow continues.Suggested reviewers:
nmzikPriority: ⬇️ Low
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
fad25The split-buffer path now rejects overflowing totals before allocation or copying; no actionable merge risk remains.
Pre-merge checks |
4 |
1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
#1329is closed, so it supplies historical context only. No active directly linked issue supplies coding requirements. The reported change matches the historical AJM objective, but that objectiv…src/libs/ajm.cppand adds overflow checks for the input and output buffer size sums inAjmDecodeSplitInstance. The change has a direct connection to the historical AJM con…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