Review Board 1.7.16

chan_sip: [general] maxforwards, not checked for a value greater than 255

Review Request #1888 - Created April 25, 2012 and submitted

Alec Davis
1.8 and above
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.

Ship it!
Posted (April 25, 2012, 11:29 p.m.)
You are exactly right. My mistake. I can commit it if you can not. Just find me on IRC or e-mail.
  1. I can commit.
Ship it!
Posted (April 25, 2012, 11:39 p.m.)
Go go go. runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to