[asterisk-dev] [Code Review] Fix range checking with ast_parse_arg numeric types and add tests

Mark Michelson reviewboard at asterisk.org
Thu Apr 26 09:41:04 CDT 2012


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

Ship it!


Ship it yo!

- Mark


On April 24, 2012, 6:10 p.m., Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1879/
> -----------------------------------------------------------
> 
> (Updated April 24, 2012, 6:10 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> I started out by writing unit tests for ast_parse_arg and found out that it didn't actually catch errors where the string parsed resulted in an overflow of the type. So this patch adds the tests and fixes the errors that the test found. I started writing tests for the PARSE_ADDR type, but it really is just a very simple wrapper around ast_sockaddr_parse() which is tested in the netsock2 tests. Since it didn't really seem like there was a benefit to testing it twice, I didn't include tests for that.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/config.c 362634 
>   /branches/1.8/tests/test_config.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/1879/diff
> 
> 
> Testing
> -------
> 
> Wrote a test that now passes.
> 
> 
> Thanks,
> 
> Terry
> 
>

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


More information about the asterisk-dev mailing list