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

Olle E Johansson reviewboard at asterisk.org
Thu Apr 26 04:29:32 CDT 2012


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

Ship it!


You are exactly right. My mistake. I can commit it if you can not. Just find me on IRC or e-mail.

- Olle E


On April 26, 2012, 4:17 a.m., Alec Davis wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1888/
> -----------------------------------------------------------
> 
> (Updated April 26, 2012, 4:17 a.m.)
> 
> 
> 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/0ec29006/attachment.htm>


More information about the asterisk-dev mailing list