[asterisk-dev] [Code Review] chan_sip: [general] maxforwards, not checked for a value greater than 255

Alec Davis reviewboard at asterisk.org
Thu Apr 26 04:17:13 CDT 2012


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

Review request for Asterisk Developers.


Summary
-------

The peer maxforwards is checked for both '< 1' and '> 255',
but the default 'maxforwards' in the [general] section is only checked for '< 1'.

Pet hate: if a number is always 0 or positive, decleare it 'unsigned':
thus 'maxforwards' should be declared 'unsigned int' not 'int', and use '%30u' instead '%30d' with sscanf.


Diffs
-----

  trunk/channels/chan_sip.c 361088 

Diff: https://reviewboard.asterisk.org/r/1888/diff


Testing
-------


Thanks,

Alec

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


More information about the asterisk-dev mailing list