Merged revisions 67066 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Mon, 4 Jun 2007 18:00:24 +0000 (18:00 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 4 Jun 2007 18:00:24 +0000 (18:00 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67066 | file | 2007-06-04 13:59:14 -0400 (Mon, 04 Jun 2007) | 2 lines

Initialize cidname variable to nothing since it may be used without having been touched. (issue #9661 reported by dimas)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67067 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c

index f8b5e02..f713f33 100644 (file)
@@ -511,7 +511,7 @@ static void do_forward(struct chanlist *o,
                        senddialevent(in, c);
                        /* After calling, set callerid to extension */
                        if (!ast_test_flag(peerflags, OPT_ORIGINAL_CLID)) {
-                               char cidname[AST_MAX_EXTENSION];
+                               char cidname[AST_MAX_EXTENSION] = "";
                                ast_set_callerid(c, S_OR(in->macroexten, in->exten), get_cid_name(cidname, sizeof(cidname), in), NULL);
                        }
                        /* Hangup the original channel now, in case we needed it */
@@ -1192,7 +1192,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
        struct cause_args num = { chan, 0, 0, 0 };
        int cause;
        char numsubst[256];
-       char cidname[AST_MAX_EXTENSION];
+       char cidname[AST_MAX_EXTENSION] = "";
 
        struct ast_bridge_config config;
        unsigned int calldurationlimit = 0;