Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bugfix] Add missing early return in AudioSubsectionReader::readSampl…
…es() Looks like a very old regression since 27895cb In case clearSamplesBeyondAvailableLength() returns a negative number of samples, we need to avoid calling readSamples() on the source reader. One reason is that it's possible the source reader readSamples() will also call clearSamplesBeyondAvailableLength(), which can end up calling zeromem() with that negative number of samples, causing a crash. (that would happen in case samplesAvailable's value would be an even lower negative number, causing the condition `(samplesAvailable < numSamples)` to evaluate to true).
- Loading branch information