summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-10-09 22:24:10 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-10-09 22:24:10 +0000
commit9a0ff624528ce6c62ce7782c83928bfd35696f96 (patch)
tree05059743d5122c65b2f7891823b390034748a105 /main
parent766d133c622fe34358e35231b0cb60c3283a68f9 (diff)
Fix execution of 'i' extension due to uninitialized variable.
The fix for ASTERISK-18243 added code that could potentially use dst_exten[] uninitialized. As a result the 'i' exten may not be executed when it should. (closes issue ASTERISK-20455) Reported by: Richard Miller Patches: pbx-1.8.16.0.diff (license #5685) patch uploaded by Richard Miller Made some cosmetic modifications. ........ Merged revisions 374758 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374763 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374771 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/pbx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 1e8f1a33b..9fdd3a154 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -6026,6 +6026,9 @@ static enum ast_pbx_result __ast_pbx_run(struct ast_channel *c,
int invalid = 0;
int timeout = 0;
+ /* No digits pressed yet */
+ dst_exten[pos] = '\0';
+
/* loop on priorities in this context/exten */
while (!(res = ast_spawn_extension(c, ast_channel_context(c), ast_channel_exten(c), ast_channel_priority(c),
S_COR(ast_channel_caller(c)->id.number.valid, ast_channel_caller(c)->id.number.str, NULL),