[asterisk-dev] [Code Review] 3809: features config: prevent assert on no featuregroups or applicationmap

rmudgett reviewboard at asterisk.org
Thu Jul 17 12:46:27 CDT 2014


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



/team/group/media_formats-reviewed-trunk/main/features_config.c
<https://reviewboard.asterisk.org/r/3809/#comment23012>

    These should never be NULL here since the only caller is the config framework and it only allocates the config with the containers.
    
    Did you hit an assert through this call?



/team/group/media_formats-reviewed-trunk/main/features_config.c
<https://reviewboard.asterisk.org/r/3809/#comment23013>

    This is the bug:
    __features_config_alloc(0) should be features_config_alloc()
    
    The globals config struct should always have those containers allocated.


- rmudgett


On July 16, 2014, 2:50 p.m., Scott Griepentrog wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3809/
> -----------------------------------------------------------
> 
> (Updated July 16, 2014, 2:50 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> During testing, encountered an assert due to a null featuregroup passed to ao2_find().  This patch adds null checks around cfg->featuregroups and cfg->applicationmap, since they are not duplicated or initialized when features are copied.
> 
> 
> Diffs
> -----
> 
>   /team/group/media_formats-reviewed-trunk/main/features_config.c 418781 
> 
> Diff: https://reviewboard.asterisk.org/r/3809/diff/
> 
> 
> Testing
> -------
> 
> Repeated previously asserting test sequence with success.
> 
> 
> Thanks,
> 
> Scott Griepentrog
> 
>

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


More information about the asterisk-dev mailing list