mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
Add FreeBSD/POSIX lfind and lsearch for the libc PRX, with explicit guards against null arguments, zero element size, and span arithmetic that would overflow size_t. lsearch validates the existing search range before any comparator call, then separately checks the append capacity so a matched element never requires room for an extra one. Extend guest_search to cover first-match on duplicate keys, zero-count no-op, byte-exact appended payload, zero-count seed, and that the overflow guard fires without touching element memory or invoking the callback. Document the exports in docs/dev/debt/libc.md. Co-Authored-By: Claude Opus 4.7 <[email protected]>