[asterisk-dev] [Code Review] remove checks for alloca and ast_strdupa NULL return value

Tilghman Lesher reviewboard at asterisk.org
Thu Jul 12 10:46:06 CDT 2012


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


That alloca() cannot return NULL is a Linux-ism.  On FreeBSD, for example, it's perfectly possible for alloca() to return NULL.  Therefore, this patch should fail on cross-platform compatibility.

- Tilghman


On July 12, 2012, 10:26 a.m., wdoekes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2032/
> -----------------------------------------------------------
> 
> (Updated July 12, 2012, 10:26 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> alloca and ast_strdupa shouldn't be checked for NULL.
> 
> 
> This addresses bug ASTERISK-20125.
>     https://issues.asterisk.org/jira/browse/ASTERISK-20125
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/addons/res_config_mysql.c 369969 
>   /branches/1.8/apps/app_macro.c 369969 
>   /branches/1.8/apps/app_meetme.c 369969 
>   /branches/1.8/apps/app_minivm.c 369969 
>   /branches/1.8/apps/app_osplookup.c 369969 
>   /branches/1.8/channels/chan_gtalk.c 369969 
>   /branches/1.8/channels/chan_iax2.c 369969 
>   /branches/1.8/channels/chan_jingle.c 369969 
>   /branches/1.8/channels/chan_sip.c 369969 
>   /branches/1.8/funcs/func_cut.c 369969 
>   /branches/1.8/funcs/func_logic.c 369969 
>   /branches/1.8/funcs/func_strings.c 369969 
>   /branches/1.8/main/file.c 369969 
>   /branches/1.8/main/http.c 369969 
>   /branches/1.8/main/pbx.c 369969 
>   /branches/1.8/main/strcompat.c 369969 
>   /branches/1.8/pbx/pbx_dundi.c 369969 
>   /branches/1.8/pbx/pbx_realtime.c 369969 
>   /branches/1.8/res/res_agi.c 369969 
> 
> Diff: https://reviewboard.asterisk.org/r/2032/diff
> 
> 
> Testing
> -------
> 
> It compiles.
> 
> 
> Thanks,
> 
> wdoekes
> 
>

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


More information about the asterisk-dev mailing list