Files
ppsspp/UI
Henrik RydgårdandClaude Sonnet 5 406033dc3d RIFF/BackgroundAudio: fix OOB reads on short/corrupt WAV chunks
RIFFReader::ReadData() trusted its count argument completely and
memcpy'd straight from the internal buffer with no bounds check.
Hardened it to clamp against the buffer and zero-fill any shortfall,
as defense in depth.

The actual reachable bug was in BackgroundAudio.cpp: it read a WAV
'smpl' chunk into a vector sized by GetCurrentChunkSize(), then
unconditionally indexed smplData[28] (and, for the loop array,
smplData[36]) with no check that the chunk was actually that large -
a short/corrupt chunk in a game's background-music WAV caused a heap
OOB read. Also fixes &smplData[0] being UB when the chunk is empty.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L4QAoxV2KY7ek4PcZw3WvY
2026-08-09 19:31:02 +02:00
..
2026-08-09 19:03:08 +02:00
2025-11-24 20:33:13 +01:00
2025-08-22 21:21:19 +02:00
2026-08-07 08:49:29 +02:00
2026-05-28 10:56:35 +02:00
2026-08-08 18:18:28 +02:00
2026-06-24 23:04:17 +02:00
2026-06-24 23:04:17 +02:00
2026-06-24 23:04:17 +02:00
2025-03-26 18:57:38 +01:00
2026-01-02 14:20:20 +01:00
2026-02-24 00:56:45 +01:00
2026-02-24 00:56:45 +01:00
2026-07-18 11:57:48 +02:00