Fixed an illegal memory access, yay for the new address sanitizer

This commit is contained in:
Damiano Galassi committed 2015-08-20 13:31:52 +02:00
1 parent ae80f72bd0
commit b06696f299
1 file changed
+1 -1
+1 -1
View File
@@ -316,7 +316,7 @@ OSStatus DecoderDataProc(AudioConverterRef inAudioConverter,
decoderData.pos = 0;
decoderData.srcFormat = decoderData.inputFormat;
decoderData.numPacketsPerRead = 1;
decoderData.pktDescs = (AudioStreamPacketDescription*)malloc(decoderData.numPacketsPerRead);
decoderData.pktDescs = (AudioStreamPacketDescription *)malloc(decoderData.numPacketsPerRead * sizeof(AudioStreamPacketDescription));
decoderData.inputSamplesBuffer = _inputSamplesBuffer;
// set up our output buffers