Merge pull request #14805 from Tilka/zelda_oob

DSPHLE/Zelda: prevent out-of-bounds stack read
This commit is contained in:
OatmealDome
2026-08-10 17:15:35 -04:00
committed by GitHub
@@ -1715,6 +1715,12 @@ void ZeldaAudioRenderer::DownloadAFCSamplesFromARAM(s16* dst, VPB* vpb, u16 requ
return;
}
if (vpb->afc_remaining_decoded_samples > 0x10) [[unlikely]]
{
ERROR_LOG_FMT(DSPHLE, "afc_remaining_decoded_samples > 0x10");
vpb->afc_remaining_decoded_samples = 0x10;
}
// Try several things until we have output enough samples.
while (true)
{