Use snprintf in __ast_request_and_dial instead of sprintf
authorJames Golovich <james@gnuinter.net>
Tue, 29 Jun 2004 19:29:03 +0000 (19:29 +0000)
committerJames Golovich <james@gnuinter.net>
Tue, 29 Jun 2004 19:29:03 +0000 (19:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3356 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 9459e90..3af70d1 100755 (executable)
--- a/channel.c
+++ b/channel.c
@@ -1796,7 +1796,7 @@ struct ast_channel *__ast_request_and_dial(char *type, int format, void *data, i
                }
                if (chan->cdr) {
                        char tmp[256];
-                       sprintf(tmp, "%s/%s",type,(char *)data);
+                       snprintf(tmp, 256, "%s/%s", type, (char *)data);
                        ast_cdr_setapp(chan->cdr,"Dial",tmp);
                        ast_cdr_update(chan);
                        ast_cdr_start(chan->cdr);