From de9bebc7790a256e46346532feb668c3b314bfb6 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Wed, 18 Sep 2013 23:20:26 -0400 Subject: [PATCH] FS-5790 --resolve mod_rayo: fix buffer overflow when reading stereo .wav file --- src/mod/event_handlers/mod_rayo/rayo_output_component.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/event_handlers/mod_rayo/rayo_output_component.c b/src/mod/event_handlers/mod_rayo/rayo_output_component.c index e85a12cece..e092ebd046 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_output_component.c +++ b/src/mod/event_handlers/mod_rayo/rayo_output_component.c @@ -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");