FS-5790 --resolve mod_rayo: fix buffer overflow when reading stereo .wav file

This commit is contained in:
Chris Rienzo 2013-09-18 23:20:26 -04:00
parent a7ab24ef4c
commit de9bebc779

View File

@ -642,7 +642,7 @@ static switch_status_t fileman_file_open(switch_file_handle_t *handle, const cha
switch_mutex_unlock(fileman_globals.mutex);
context->max_frame_len = (handle->samplerate / 1000 * SWITCH_MAX_INTERVAL);
switch_zmalloc(context->abuf, FILE_STARTBYTES);
switch_zmalloc(context->abuf, FILE_STARTBYTES * sizeof(*context->abuf));
if (!context->fh.audio_buffer) {
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Create audio buffer\n");