The libc.prx that titles ship (PPSA07923, PPSA05916) treats a size or
limit above SIZE_MAX >> 3 as a bad argument and calls the constraint
handler with EINVAL or ERANGE and a null pointer for each violation:
"wcsrtombs_s: bad argument" or "wcstombs_s: bad argument", and for a
buffer that is too small "wcstombs_s: buffer too small" from
wcsrtombs_s and "wcstombs_s: buffer overflow" from wcstombs_s. main
only returned the error and accepted sizes and limits up to 2^63.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
libc.prx did not export wcstombs_s (sZLrjx-yEx4); only libSceAmpr did.
Ghost of Yotei imports it from libc.prx and stops at symbol resolution.
Move the implementation to libc next to wcsrtombs_s. libSceAmpr keeps
its export through an explicit-NID wrapper, because the NID patcher
leaves symbols that libc exports unrenamed in other libraries.