[tor-bugs] #6218 [Tor Relay]: wrong max port range in parse_port_range()

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Jun 22 14:54:26 UTC 2012


#6218: wrong max port range in parse_port_range()
-----------------------+----------------------------------------------------
 Reporter:  asn        |          Owner:                    
     Type:  defect     |         Status:  new               
 Priority:  normal     |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay  |        Version:                    
 Keywords:             |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------
 https://gitweb.torproject.org/tor.git/blob/HEAD:/src/common/address.c#l1529
 :
 {{{
       port_max = (int)tor_parse_long(port, 10, 1, 65536, &ok, &endptr);
 }}}

 The good thing is that if `65536` is given as `port_max` in the above
 code, it's still caught by:
 {{{
   if (port_max > 65535)
     port_max = 65535;
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6218>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list