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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@374758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2012-10-09 22:16:34 +00:00
parent 559695d25a
commit 3e75474995

View File

@@ -5000,6 +5000,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, c->context, c->exten, c->priority,
S_COR(c->caller.id.number.valid, c->caller.id.number.str, NULL),