mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 01:49:42 -06:00
prevent out of bounds access for microphone data
This commit is contained in:
@ -330,7 +330,11 @@ void EmuInstance::micProcess()
|
|||||||
micBufferReadPos += len;
|
micBufferReadPos += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len < kFrameLen)
|
if (len == 0)
|
||||||
|
{
|
||||||
|
memset(tmp, 0, sizeof(tmp));
|
||||||
|
}
|
||||||
|
else if (len < kFrameLen)
|
||||||
{
|
{
|
||||||
for (int i = len; i < kFrameLen; i++)
|
for (int i = len; i < kFrameLen; i++)
|
||||||
tmp[i] = tmp[len-1];
|
tmp[i] = tmp[len-1];
|
||||||
|
Reference in New Issue
Block a user