The capacity checks only rejected (SIZE_MAX >> 3) + 1, so a tighter
limit or a >= comparison still passed. A call with capacity
SIZE_MAX >> 3 now has to succeed without a handler call. Suggested by
rooklz in review.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The libc.prx that titles ship (PPSA07923, PPSA05916) rejects a
strerror_s capacity above SIZE_MAX >> 3, not SIZE_MAX >> 1, and calls
the constraint handler with "strerror_s: bad argument", EINVAL and a
null pointer for a null destination, a capacity of 0 or one past that
limit. main passed "strerror_s" and the destination, and wrote the
message for a capacity from 2^61 up.
Co-Authored-By: Claude Opus 5.5 <[email protected]>