fix(libSceVisionManager): reject a null count in GetNumOfRegisterUserDataSlot #15072
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15072"
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 MarcZX10 on 2026-11-02T14:05:39Z.
What
sceVisionManagerGetNumOfRegisterUserDataSlotwrote*countfor a known library version without checking the pointer, so a nullcountcrashed the host. It now returnsErrorInvalidArgumentfor a null pointer, matching the other null checks in that library. A debt note records the new result.2ac65501a1fix(libSceVisionManager): reject a null count in sceVisionManagerGetNumOfRegisterUserDataSlotf9e23488e7test(libSceVisionManager): cover a null count in sceVisionManagerGetNumOfRegisterUserDataSlot4c40772977docs(libSceVisionManager): document the null count result of GetNumOfRegisterUserDataSlotTested
ctest -R '^guest_firmware_constant_returns$'(targetguest_firmware_constant_returns_tests): 100% passed.tools/check_conventions.py --base upstream/main: 0 errors. One warning about the length ofdocs/dev/debt/libSceVisionManager.mdexisted before this change.git diff --check upstream/main: clean.Not verified
ErrorInvalidArgument) follows the library's other null-pointer checks; it was not captured from the console.Checklist
main; no other open PR changes this functionImported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-02T14:54:23Z.
Review: COMMENTED
Answering @oneandonlydean's question from the firmware: the module doesn't check
count, so the null result is a host-side guard.Firmware 13.42's
libSceVisionManager.sprx(system/priv/lib, sha256b96cc40d93cd9484591048d92e6023e04f3571e352bdcf446052b879d226c83c) at0x160d0(kDHvQLi0PM4), read from disassembly only, not measured on a console:So for either known version the console faults on a null
count. An unknown version returns0x80E70000without touching it, which matchesmain. The guard is fine as a host-safety fallback. The debt sentence could read, for example: "Firmware 13.42 stores the slot count without checking the pointer, so the console faults on a nullcount; AnyPS5 returns 0x80E70000 instead."