[asterisk-dev] [Code Review] Tab completion for 'acl show'

Matt Jordan reviewboard at asterisk.org
Thu Dec 6 08:13:05 CST 2012


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



/trunk/main/named_acl.c
<https://reviewboard.asterisk.org/r/2230/#comment14277>

    This could actually crash.  ast_named_acl_init doesn't return failure if it fails to parse the configuration (it probably should...), which means you could have nothing stored in the globals ao2 container.  When you get the reference in the constructor call of the RAII_VAR macro, it could actually be NULL (nothing is in the container), which you dereference in ao2_iterator_init.
    
    I'd either check that you have a cfg object prior to doing the generation, or change it so that a failure to load the named ACLs completely bombs out.  This would make it so Asterisk won't load, which would be more intrusive, but there's a good chance it probably should completely fail to load if there's a configuration error in this component.


- Matt


On Dec. 6, 2012, 7:55 a.m., Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2230/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2012, 7:55 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Add tab completion for the 'acl show' CLI command.
> 
> 
> Diffs
> -----
> 
>   /trunk/main/named_acl.c 377308 
> 
> Diff: https://reviewboard.asterisk.org/r/2230/diff
> 
> 
> Testing
> -------
> 
> Did some mad tab complete action.
> 
> 
> Thanks,
> 
> Russell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121206/bb19286f/attachment-0001.htm>


More information about the asterisk-dev mailing list