DSPHLE/Zelda: prevent out-of-bounds stack read
Reported by @RickdeJager.
This commit is contained in:
@@ -1715,6 +1715,12 @@ void ZeldaAudioRenderer::DownloadAFCSamplesFromARAM(s16* dst, VPB* vpb, u16 requ
|
|||||||
return;
|
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.
|
// Try several things until we have output enough samples.
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user