Fix "send text" crash (bug #3378)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-01-20 03:38:23 +00:00
parent 63a98a2bed
commit 61d87e19f1

View File

@@ -863,7 +863,7 @@ static int console_sendtext(int fd, int argc, char *argv[])
struct ast_frame f = { AST_FRAME_TEXT, 0 };
char text2send[256] = "";
text2send[0] = '\0';
while(tmparg <= argc) {
while(tmparg < argc) {
strncat(text2send, argv[tmparg++], sizeof(text2send) - strlen(text2send) - 1);
strncat(text2send, " ", sizeof(text2send) - strlen(text2send) - 1);
}