aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-25 14:13:54 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-25 14:13:54 +0000
commit3d4721b2ae8ce79ca39dfadd5c3681751a48e318 (patch)
treedb3205468ffd847ecfa4703cc6a9a1f7f45c8dc7
parent29652681049f483c6acf875275dc0c7c4ebfc0a0 (diff)
issue #5850
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7195 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xChangeLog4
-rwxr-xr-xapps/app_dial.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index e88a8ae2d..d88e4583c 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-25 Russell Bryant <russell@digium.com>
+
+ * apps/app_dial.c: Properly duplicate the string for ANI (issue #5850)
+
2005-11-23 Russell Bryant <russell@digium.com>
* configs/voicemail.conf.sample: Add note to indicate that #include should not be used for this file. (issue #5828)
diff --git a/apps/app_dial.c b/apps/app_dial.c
index e1725b57e..ff940dd73 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -512,10 +512,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (in->cid.cid_ani) {
if (o->chan->cid.cid_ani)
free(o->chan->cid.cid_ani);
- o->chan->cid.cid_ani = malloc(strlen(in->cid.cid_ani) + 1);
- if (o->chan->cid.cid_ani)
- ast_copy_string(o->chan->cid.cid_ani, in->cid.cid_ani, sizeof(o->chan->cid.cid_ani));
- else
+ o->chan->cid.cid_ani = strdup(in->cid.cid_ani);
+ if (!o->chan->cid.cid_ani)
ast_log(LOG_WARNING, "Out of memory\n");
}
if (o->chan->cid.cid_rdnis)