1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-09 16:41:14 +02:00

This is the only possible null pointer deref found by cppcheck scan on src that I think is worth making failsafe.

This commit is contained in:
v.audacity 2011-11-10 07:37:50 +00:00
parent 8adac0ed64
commit 412b81392c

View File

@ -454,6 +454,12 @@ bool AudioUnitEffect::ProcessStereo(int count,
bufferList = (AudioBufferList *)malloc(sizeof(UInt32) +
numChannels * sizeof(AudioBuffer));
if (!bufferList)
{
printf("Setting input render callback failed.\n");
AudioUnitUninitialize(trackUnit);
return false;
}
bufferList->mNumberBuffers = numChannels;
sampleCount originalLen = len;