[asterisk-dev] [Code Review] resilient ast_copy_string()
Sean Bright
sean.bright at gmail.com
Thu Feb 18 12:50:41 CST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/519/#review1537
-----------------------------------------------------------
I would argue that if you are crashing because src is NULL, then there is another problem that needs to be addressed. Silently ignoring a NULL src might hide a bigger problem.
- Sean
On 2010-02-18 12:18:33, David Vossel wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/519/
> -----------------------------------------------------------
>
> (Updated 2010-02-18 12:18:33)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Why not check to see if the src string is NULL in ast_copy_string? It just seems like a inexpensive check to avoid a silly crash. If we're going to make our own string copy function why not make it resilient as well?
>
>
> Diffs
> -----
>
> /trunk/include/asterisk/strings.h 247604
>
> Diff: https://reviewboard.asterisk.org/r/519/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> David
>
>
More information about the asterisk-dev
mailing list