mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-28 15:11:12 +00:00
Fix "send text" crash (bug #3378)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -867,7 +867,7 @@ static int console_sendtext(int fd, int argc, char *argv[])
|
|||||||
struct ast_frame f = { AST_FRAME_TEXT, 0 };
|
struct ast_frame f = { AST_FRAME_TEXT, 0 };
|
||||||
char text2send[256] = "";
|
char text2send[256] = "";
|
||||||
text2send[0] = '\0';
|
text2send[0] = '\0';
|
||||||
while(tmparg <= argc) {
|
while(tmparg < argc) {
|
||||||
strncat(text2send, argv[tmparg++], sizeof(text2send) - strlen(text2send) - 1);
|
strncat(text2send, argv[tmparg++], sizeof(text2send) - strlen(text2send) - 1);
|
||||||
strncat(text2send, " ", sizeof(text2send) - strlen(text2send) - 1);
|
strncat(text2send, " ", sizeof(text2send) - strlen(text2send) - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user