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.4.26~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02dde638f58bcb35d7c74259b745e096df493a6e;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 82e50c21c0..51a2551272 100644 --- a/src/mod/applications/mod_esf/mod_esf.c +++ b/src/mod/applications/mod_esf/mod_esf.c @@ -473,7 +473,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 {