From: Anthony Minessale Date: Tue, 19 Apr 2011 18:51:08 +0000 (-0500) Subject: adding fix that was reported on the mailing list and thoughtlessly left there to... X-Git-Tag: v1.2-rc1~118^2~103^2~2^2~3^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7d8f848117abc165a4ef2b97c2a7c4574c84649c;p=thirdparty%2Ffreeswitch.git adding fix that was reported on the mailing list and thoughtlessly left there to rot despite my begging them to open a JIRA --- diff --git a/src/switch_core_codec.c b/src/switch_core_codec.c index 96f8d57726..feaca4b7ed 100644 --- a/src/switch_core_codec.c +++ b/src/switch_core_codec.c @@ -658,7 +658,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec, if (frames && codec->implementation->decoded_bytes_per_packet * frames > *decoded_data_len) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Buffer size sanity check failed!\n"); - return SWITCH_STATUS_GENERR; + *decoded_data_len = codec->implementation->decoded_bytes_per_packet; + memset(decoded_data, 255, *decoded_data_len); + return SWITCH_STATUS_SUCCESS; } }