fix(libSceGameCustomDataDialog): return arg-null for unwritable result #15759
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15759"
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 StepFPV on 2026-11-04T13:06:53Z.
What
sceGameCustomDataDialogGetResultAcopied itsint32_tresult into the guestresultpointer withstd::memcpyafter a null check only, so a non-null but unmapped or unwritable guest pointer faulted (SIGSEGV) instead of returning an error. Route the write throughGuestCopyOut_nid_no_patchand returnCOMMON_DIALOG_ERROR_ARG_NULL(0x80B8000D) when the checked write fails, aslibSceMsgDialog.nativealready does for the same result-pointer case. Observable behaviour is otherwise unchanged. Dropped the now-unused<cstring>include.Tested
Windows 11, full build (WinLibs GCC 15.2.0 UCRT, DWARF exceptions),
ctest --test-dir build -R guest_game_custom_data_dialogpasses. Added a regression case that passes unmapped guest pointers (1and~uintptr_t{0xfff}) to the finished dialog and assertsCOMMON_DIALOG_ERROR_ARG_NULLwith no crash. Reverting only the library tomain(rawstd::memcpy) makes the same test SIGSEGV; with the fix it returns the error code.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Pull request closed