mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-16 15:27:11 -05:00
DSPHLE/Zelda: prevent out-of-bounds stack read
Reported by @RickdeJager.
This commit is contained in:
committed by
OatmealDome
parent
44dd6aad30
commit
5888eb6eb6
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user