launcher: add local game patches #111

Manually merged
github merged 1 commit from gh-pr/111/head into gh-pr/111/base 2026-11-26 09:10:37 +00:00
Owner

@⁠Nmzik on GitHub · 2026-07-27 14:17 UTC · original
KytyPS5:codex/shadps4-texture-architecture → main · +497 −14 · 14 files · 1 commits · merged 2026-07-27 14:19 UTC

No description provided.

**@⁠Nmzik** on GitHub · 2026-07-27 14:17 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/111) `KytyPS5:codex/shadps4-texture-architecture` → `main` · +497 −14 · 14 files · 1 commits · merged 2026-07-27 14:19 UTC *No description provided.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:10:36 +00:00
github manually merged commit b3217a00e0 into gh-pr/111/base 2026-11-26 09:10:37 +00:00
Author
Owner

@⁠Nmzik on GitHub · 2026-07-27 14:24 UTC · original · reviewed

Blocking findings remain in the patch application path. The current implementation can select an unintended guest address when a signature is ambiguous and can silently compose conflicting enabled patches. Please make target resolution unambiguous, reject overlapping ranges before mutation, and add focused tests for zero/one/multiple matches and conflicting writes.

**@⁠Nmzik** on GitHub · 2026-07-27 14:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/111#pullrequestreview-4788079710) · **reviewed** Blocking findings remain in the patch application path. The current implementation can select an unintended guest address when a signature is ambiguous and can silently compose conflicting enabled patches. Please make target resolution unambiguous, reject overlapping ranges before mutation, and add focused tests for zero/one/multiple matches and conflicting writes.
@ -0,0 +211,4 @@
::printf("Game patch: found %zu entries for '%s'\n", match_count,
write->patch_name.c_str());
if (match == 0) {
Author
Owner

@⁠Nmzik on GitHub · 2026-07-27 14:24 UTC · original

Blocking: reject ambiguous signatures instead of patching the first match. match_count already records every occurrence, but this condition only rejects zero matches. A short or non-unique byte sequence can therefore select whichever occurrence happens to be scanned first and modify unrelated guest code. Require exactly one match, or include an explicit disambiguating offset/range in the plan.

**@⁠Nmzik** on GitHub · 2026-07-27 14:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/111#discussion_r3658083478) Blocking: reject ambiguous signatures instead of patching the first match. `match_count` already records every occurrence, but this condition only rejects zero matches. A short or non-unique byte sequence can therefore select whichever occurrence happens to be scanned first and modify unrelated guest code. Require exactly one match, or include an explicit disambiguating offset/range in the plan.
@ -0,0 +228,4 @@
}
bool ApplyWrites(Plan* plan, std::string* error) {
for (auto& write: plan->writes) {
Author
Owner

@⁠Nmzik on GitHub · 2026-07-27 14:24 UTC · original

Blocking: validate the resolved write set for overlapping ranges before applying it. Every enabled write is resolved against the original image, then these writes are committed sequentially without rechecking expected; two patches targeting the same or overlapping bytes both pass preparation and the later write silently overwrites the earlier one. Reject conflicts (or define and validate explicit composition semantics) before changing memory.

**@⁠Nmzik** on GitHub · 2026-07-27 14:24 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/111#discussion_r3658083487) Blocking: validate the resolved write set for overlapping ranges before applying it. Every enabled write is resolved against the original image, then these writes are committed sequentially without rechecking `expected`; two patches targeting the same or overlapping bytes both pass preparation and the later write silently overwrites the earlier one. Reject conflicts (or define and validate explicit composition semantics) before changing memory.
This discussion has been locked. Commenting is limited to contributors.
No description provided.