From 6728ebb72c66ebe2e9ab0451f0f1df978955ca1b Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Tue, 19 Sep 2006 12:28:55 +0000 Subject: [PATCH] cid is passed to a destructive function; thus a copy is needed (issue 7961) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43248 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 1672144e87..1bd79709ce 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3841,7 +3841,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"); @@ -6462,7 +6462,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 */ -- 2.47.2