mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
Add safety check for codec implementations with bytes_per_frames being larger than the recommended buffer size (Klocwork #1039)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8514 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -487,6 +487,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
|
||||
|
||||
if (switch_test_flag(read_frame, SFF_CNG)) {
|
||||
sendlen = read_codec->implementation->bytes_per_frame;
|
||||
switch_assert(sendlen <= SWITCH_RECOMMENDED_BUFFER_SIZE);
|
||||
memset(decoded, 255, sendlen);
|
||||
sendbuf = decoded;
|
||||
tstatus = SWITCH_STATUS_SUCCESS;
|
||||
|
Reference in New Issue
Block a user