Richard Kenner
2013-Jan-24 02:13 UTC
[asterisk-users] Uninitialized variable in main/pbx.c?
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,
Matthew Jordan
2013-Jan-24 02:50 UTC
[asterisk-users] Uninitialized variable in main/pbx.c?
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
Steve Edwards
2013-Jan-24 03:00 UTC
[asterisk-users] Uninitialized variable in main/pbx.c?
On Wed, 23 Jan 2013, Richard Kenner wrote:> + dst_exten[0] = '\0';Is this 'construct' prefered over dst_exten[0] = 0; or *dst_exten = 0; and why? -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000