Merged revisions 43248 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 19 Sep 2006 12:30:17 +0000 (12:30 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 19 Sep 2006 12:30:17 +0000 (12:30 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43248 | tilghman | 2006-09-19 07:28:55 -0500 (Tue, 19 Sep 2006) | 2 lines

cid is passed to a destructive function; thus a copy is needed (issue 7961)

........

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

apps/app_voicemail.c

index f0c9d98..4e605e9 100644 (file)
@@ -4477,7 +4477,7 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
                return 0;
        }
 
-       cid = ast_variable_retrieve(msg_cfg, "message", "callerid");
+       cid = ast_strdupa(ast_variable_retrieve(msg_cfg, "message", "callerid"));
        duration = ast_variable_retrieve(msg_cfg, "message", "duration");
        category = ast_variable_retrieve(msg_cfg, "message", "category");
 
@@ -7540,7 +7540,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
                return 0;
        }
 
-       cid = ast_variable_retrieve(msg_cfg, "message", "callerid");
+       cid = ast_strdupa(ast_variable_retrieve(msg_cfg, "message", "callerid"));
 
        context = ast_variable_retrieve(msg_cfg, "message", "context");
        if (!strncasecmp("macro",context,5)) /* Macro names in contexts are useless for our needs */