[asterisk-dev] [Code Review] Fix range checking with ast_parse_arg numeric types and add tests
Terry Wilson
reviewboard at asterisk.org
Tue Apr 24 10:11:51 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1879/
-----------------------------------------------------------
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/20120424/f2624a24/attachment.htm>
More information about the asterisk-dev
mailing list