[asterisk-users] Uninitialized variable in main/pbx.c?

Matthew Jordan
Thu, 24 Jan 2013 02:50:54 -0000

On 01/23/2013 08:13 PM, Richard Kenner wrote:
> I think the below fixes what I reported earlier.  Does that seem right?
>
> *** pbx.c.old   2013-01-23 21:08:51.000000000 -0500
> --- pbx.c       2013-01-23 21:09:31.000000000 -0500
> *************** static enum ast_pbx_result __ast_pbx_run
> *** 5160,5163 ****
> --- 5160,5165 ----
>                 int timeout = 0;
>
> +               dst_exten[0] = '\0';
> +
>                 /* loop on priorities in this context/exten */
>                 while (!(res = ast_spawn_extension(c, c->context,
c->exten, c->p
> riority,
>

Yup, you're correct, it should be initialized. This was fixed in r374763
(Asterisk 10) under issue ASTERISK-20455. It was included in the 10.11.0
release.

Matt

--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org