From 50326f4d03fc8c9b6dab07e3023aebc4b3b41156 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 18 Dec 2007 17:43:38 +0000 Subject: [PATCH] opts git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6868 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_play_say.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 46e9f04e39..c67dde3757 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -686,7 +686,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess const char *timer_name; const char *prebuf; - switch_zmalloc(abuf, FILE_STARTSAMPLES); + switch_zmalloc(abuf, FILE_STARTSAMPLES * sizeof(*abuf)); channel = switch_core_session_get_channel(session); switch_assert(channel != NULL); @@ -925,6 +925,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess } if (switch_test_flag(fh, SWITCH_FILE_PAUSE)) { + if (framelen > FILE_STARTSAMPLES) { + framelen = FILE_STARTSAMPLES; + } memset(abuf, 0, framelen); olen = ilen; do_speed = 0;