fix(libSceIcu): validate and safely copy isError pointer in utf8_appendCharSafeBody #22164
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22164"
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?
Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-11-17T07:23:39Z.
What
Validate the optional
isErrorguest pointer inutf8_appendCharSafeBodywithGuestWritable_nid_no_patchupon entry and write the error indicator viaGuestCopyOut_nid_no_patchon failure. Upfront probing onisErroronly executes when provided (null pointer append calls incur 0 probes at ~5.2 ns/call; non-null calls incur a single ~244 ns probe upfront) and copy-out occurs exclusively on failure, leaving valid paths and character iteration unhindered whileutf8_nextCharSafeBodyandutf8_prevCharSafeBodyretain direct access to avoid inner-loop syscall overhead and Windows timeouts.Tested
ctest --test-dir /tmp/anyps5_build -R "^guest_icu_utf8$" --output-on-failurepython3 tools/check_conventions.py --base origin/mainChecklist