[asterisk-commits] rmudgett: trunk r256103 - /trunk/apps/app_dial.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 2 20:42:36 CDT 2010


Author: rmudgett
Date: Fri Apr  2 20:42:32 2010
New Revision: 256103

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=256103
Log:
Using the Dial application f option when the call is forwarded will likely crash.

Fix app_dial.c:do_forward() OPT_FORCECLID setting cid.cid_num with a stack
allocated string instead of a heap allocated string.

Modified:
    trunk/apps/app_dial.c

Modified: trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dial.c?view=diff&rev=256103&r1=256102&r2=256103
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Fri Apr  2 20:42:32 2010
@@ -835,7 +835,7 @@
 		c->cid.cid_tns = in->cid.cid_tns;
 
 		if (ast_test_flag64(o, OPT_FORCECLID)) {
-			S_REPLACE(c->cid.cid_num, ast_strdupa(S_OR(in->macroexten, in->exten)));
+			S_REPLACE(c->cid.cid_num, ast_strdup(S_OR(in->macroexten, in->exten)));
 			S_REPLACE(c->cid.cid_name, NULL);
 			ast_string_field_set(c, accountcode, c->accountcode);
 		} else {




More information about the asterisk-commits mailing list