mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
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. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -835,7 +835,7 @@ static void do_forward(struct chanlist *o,
|
|||||||
c->cid.cid_tns = in->cid.cid_tns;
|
c->cid.cid_tns = in->cid.cid_tns;
|
||||||
|
|
||||||
if (ast_test_flag64(o, OPT_FORCECLID)) {
|
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);
|
S_REPLACE(c->cid.cid_name, NULL);
|
||||||
ast_string_field_set(c, accountcode, c->accountcode);
|
ast_string_field_set(c, accountcode, c->accountcode);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user