Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't crash if an out-of-bounds read would occur

  • Loading branch information...
commit 24ff88b5590997f99fc91e7553b00e177f55f0da 1 parent 726d8e6
@sbooth authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ThirdParty/PublicUtility/CARingBuffer.cpp
View
2  ThirdParty/PublicUtility/CARingBuffer.cpp
@@ -261,7 +261,7 @@ CARingBufferError CARingBuffer::Fetch(AudioBufferList *abl, UInt32 nFrames, Samp
size = endRead - startRead;
// Don't perform out-of-bounds writes
- if((startRead - startRead0) > nFrames || (endRead0 - endRead) > nFrames) {
+ if((startRead - startRead0) > nFrames || (endRead0 - endRead) > nFrames || startRead == endRead) {
ZeroABL(abl, 0, nFrames * mBytesPerFrame);
return noErr;
}
Please sign in to comment.
Something went wrong with that request. Please try again.