mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 16:50:14 +00:00
Last set of strncpy/snprintf updates (bug #2049)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -852,11 +852,11 @@ static int console_sendtext(int fd, int argc, char *argv[])
|
||||
res = RESULT_FAILURE;
|
||||
} else {
|
||||
struct ast_frame f = { AST_FRAME_TEXT, 0 };
|
||||
char text2send[256];
|
||||
strcpy(text2send, "");
|
||||
char text2send[256] = "";
|
||||
text2send[0] = '\0';
|
||||
while(tmparg <= argc) {
|
||||
strncat(text2send, argv[tmparg++], sizeof(text2send) - strlen(text2send));
|
||||
strncat(text2send, " ", sizeof(text2send) - strlen(text2send));
|
||||
strncat(text2send, argv[tmparg++], sizeof(text2send) - strlen(text2send) - 1);
|
||||
strncat(text2send, " ", sizeof(text2send) - strlen(text2send) - 1);
|
||||
}
|
||||
f.data = text2send;
|
||||
f.datalen = strlen(text2send) + 1;
|
||||
|
||||
Reference in New Issue
Block a user