mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 16:24:04 +02:00
Fix a buffer overflow in the mixer.
This commit is contained in:
@@ -2369,6 +2369,11 @@ MA_API ma_result ma_mixer_begin(ma_mixer* pMixer, ma_mixer* pParentMixer, ma_uin
|
||||
}
|
||||
} else {
|
||||
frameCountIn = frameCountOut;
|
||||
|
||||
if (frameCountIn > pMixer->accumulationBufferSizeInFrames) {
|
||||
frameCountIn = pMixer->accumulationBufferSizeInFrames;
|
||||
frameCountOut = pMixer->accumulationBufferSizeInFrames;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the output frame count cannot match the parent's input frame count we need to fail. */
|
||||
|
||||
Reference in New Issue
Block a user