mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-12 12:18:32 -04:00
fdb7e194cc
AudioLoad_IsFontLoadComplete had a stub `return true` that bypassed all load-status checks, masking an out-of-bounds write: for large SAF packs (many custom sequences) SetFontLoadStatus indexed fontLoadStatus[] with fontId values larger than the fontMapSize-sized array, causing heap corruption and semi-random crashes. Remove the stub. Add a (size_t)fontId >= fontMapSize guard in both the check and the setter: out-of-range IDs (custom SAF sequences that carry no associated soundfont) are treated as "loaded" in the check and silently skipped in the write, matching prior observable behavior while eliminating the OOB access. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>