From: Mike Jerris Date: Thu, 22 Oct 2015 17:59:33 +0000 (-0500) Subject: FS-8378: [mod_esf] fix crash when using esf_page over loopback when transcoding X-Git-Tag: v1.6.4~1^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78c8a5ffba6267f50e7c3353afa57c0a9c5d11e6;p=thirdparty%2Ffreeswitch.git FS-8378: [mod_esf] fix crash when using esf_page over loopback when transcoding --- diff --git a/src/mod/applications/mod_esf/mod_esf.c b/src/mod/applications/mod_esf/mod_esf.c index 87cfba30fa..d295ca4ae0 100644 --- a/src/mod/applications/mod_esf/mod_esf.c +++ b/src/mod/applications/mod_esf/mod_esf.c @@ -475,7 +475,10 @@ SWITCH_STANDARD_APP(bcast_function) read_impl.actual_samples_per_second, ebuf, &encoded_datalen, &rate, &flag); - read_frame->data = encoded_data; + if (read_frame->buflen >= encoded_datalen) { + memcpy(read_frame->data, encoded_data, encoded_datalen); + } + read_frame->datalen = encoded_datalen; } else {