Skip to content

Commit

Permalink
TEL-5838: Fix crash when processing text frame (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-ryanc committed Feb 21, 2024
1 parent fe1ae15 commit 1afc1ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/switch_core_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -3754,7 +3754,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_read_frame(switch_core_session


if (type == SWITCH_MEDIA_TYPE_TEXT && !switch_test_flag((&engine->read_frame), SFF_CNG)) {
if (engine->red_pt) {
if (engine->red_pt && engine->tf) {
unsigned char *p = engine->read_frame.data;

*(p + engine->read_frame.datalen) = '\0';
Expand Down

0 comments on commit 1afc1ed

Please sign in to comment.