[asterisk-dev] [Code Review] 3819: Substitute Variables In Features Application Map Before Execution

Michael Young reviewboard at asterisk.org
Fri Jul 18 15:50:29 CDT 2014



> On July 16, 2014, 8:23 p.m., rmudgett wrote:
> > /trunk/main/bridge_channel.c, lines 875-876
> > <https://reviewboard.asterisk.org/r/3819/diff/1/?file=64628#file64628line875>
> >
> >     I think you want strlen(app_args) + 1 instead of sizeof(app_args) which returns the size of a pointer.  I'm surprised this didn't crash from stack corruption.
> >     
> >     Look at using ast_str_substitute_variables() instead so you don't need to create a worst case fixed sized buffer for any substituted variables.

Why yes, I am surprised too.  I did test this under trunk and no crash occurred.

An updated patch is on the way using ast_str_substitute_variables().  Thanks for the suggestion to use that instead.


- Michael


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3819/#review12701
-----------------------------------------------------------


On July 16, 2014, 7:53 p.m., Michael Young wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3819/
> -----------------------------------------------------------
> 
> (Updated July 16, 2014, 7:53 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-22608
>     https://issues.asterisk.org/jira/browse/ASTERISK-22608
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Say you wanted to include variables in an application map and have those variables substituted and passed along to the application being executed; currently this does not happen.
> This patch adds this new feature.
> 
> This simple patch was originally written for 1.4 but I have been maintaining it all the way up to version 11.  It is time to see if anyone else sees any value in this and get it committed.
> 
> 
> Diffs
> -----
> 
>   /trunk/main/bridge_channel.c 416990 
> 
> Diff: https://reviewboard.asterisk.org/r/3819/diff/
> 
> 
> Testing
> -------
> 
> This has been in production since 1.4 and updated for trunk.  The trunk version of the patch was tested on dev machine.
> 
> 
> Thanks,
> 
> Michael Young
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140718/985169f2/attachment-0001.html>


More information about the asterisk-dev mailing list