Author: mikej Date: Thu Feb 14 12:12:17 2008 New Revision: 7603 Modified: freeswitch/trunk/src/switch_ivr_async.c freeswitch/trunk/src/switch_ivr_play_say.c Log: small buffers make big segfaults Modified: freeswitch/trunk/src/switch_ivr_async.c ============================================================================== --- freeswitch/trunk/src/switch_ivr_async.c (original) +++ freeswitch/trunk/src/switch_ivr_async.c Thu Feb 14 12:12:17 2008 @@ -165,7 +165,7 @@ len = rframe->samples; if (dh->mux) { - int16_t buf[1024]; + int16_t buf[SWITCH_RECOMMENDED_BUFFER_SIZE / 2]; int16_t *fp = rframe->data; uint32_t x; @@ -237,7 +237,7 @@ len = rframe->samples; if (dh->mux) { - int16_t buf[1024]; + int16_t buf[SWITCH_RECOMMENDED_BUFFER_SIZE / 2]; int16_t *fp = rframe->data; uint32_t x; Modified: freeswitch/trunk/src/switch_ivr_play_say.c ============================================================================== --- freeswitch/trunk/src/switch_ivr_play_say.c (original) +++ freeswitch/trunk/src/switch_ivr_play_say.c Thu Feb 14 12:12:17 2008 @@ -577,7 +577,7 @@ switch_frame_t *read_frame = NULL; switch_codec_t *read_codec = NULL, write_codec = { 0 }; switch_frame_t write_frame = { 0 }; - switch_byte_t data[1024]; + switch_byte_t data[SWITCH_RECOMMENDED_BUFFER_SIZE]; switch_channel_t *channel = switch_core_session_get_channel(session); switch_channel_pre_answer(channel);
participants (1)
-
Freeswitch SVN