mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-13 04:51:38 -10:00
Check both string allocations before publishing a list entry. Construct inserted entries before moving existing rows, reject out-of-range indices and overflowing growth, and avoid reallocating an already reserved capacity. Acquire menu callbacks before inserting a row and return them to the pool if insertion fails. A rejected prepend must not reinitialize an existing row. Includes deterministic allocation failures and immediate retry checks. Inspired by PS5_RetroArch port change 0080; retains upstream's shared empty strings and callback pools without adding a persistent failure latch.