bridge_channel: Ensure text messages are zero terminated

T.140 data in RTP is not zero terminated, so when we are queuing a text
frame on a bridge we need to ensure that we are passing a zero
terminated string.

ASTERISK-28974 #close

Change-Id: Ic10057387ce30b2094613ea67e3ae8c5c431dda3
This commit is contained in:
Sean Bright
2020-08-19 13:29:51 -04:00
committed by Friendly Automation
parent 5dfeeba623
commit 5ec7099312
2 changed files with 40 additions and 2 deletions

View File

@@ -107,7 +107,10 @@ enum ast_frame_type {
AST_FRAME_NULL,
/*! Inter Asterisk Exchange private frame type */
AST_FRAME_IAX,
/*! Text messages */
/*! Text messages. The character data may not be zero-terminated, so
* care should be taken when passing it to functions that expect a
* zero-terminated string. The frame's datalen member should be used
* as it indicates the actual number of bytes available. */
AST_FRAME_TEXT,
/*! Image Frames */
AST_FRAME_IMAGE,