mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AU Client: Avoid potential out-of-bounds write when clearing buffers
Fixes an issue introduced in 72fa2d98e1
where zeromem might write past the end of the channel buffer.
This commit is contained in:
parent
45ae98effd
commit
288765b3c8
3 changed files with 14 additions and 12 deletions
|
|
@ -1346,10 +1346,10 @@ public:
|
|||
if (pulledSucceeded[busIdx])
|
||||
audioBuffer.set (busIdx, GetInput ((UInt32) busIdx)->GetBufferList(), mapper.get (true, busIdx));
|
||||
else
|
||||
audioBuffer.clearInputBus (busIdx);
|
||||
audioBuffer.clearInputBus (busIdx, (int) nFrames);
|
||||
}
|
||||
|
||||
audioBuffer.clearUnusedChannels();
|
||||
audioBuffer.clearUnusedChannels ((int) nFrames);
|
||||
}
|
||||
|
||||
// swap midi buffers
|
||||
|
|
|
|||
|
|
@ -1617,7 +1617,7 @@ private:
|
|||
for (int busIdx = 0; busIdx < numProcessorBusesIn; ++busIdx)
|
||||
audioBuffer.set (busIdx, *inBusBuffers[busIdx]->get(), mapper.get (true, busIdx));
|
||||
|
||||
audioBuffer.clearUnusedChannels();
|
||||
audioBuffer.clearUnusedChannels ((int) frameCount);
|
||||
}
|
||||
|
||||
// process audio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue