[tor-bugs] #2045 [Tor Relay]: Make tor_check_port_forwarding handle incomplete lines

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sun Oct 10 17:27:58 UTC 2010


#2045: Make tor_check_port_forwarding handle incomplete lines
-----------------------+----------------------------------------------------
 Reporter:  sjmurdoch  |       Owner:  sjmurdoch
     Type:  defect     |      Status:  new      
 Priority:  normal     |   Milestone:           
Component:  Tor Relay  |     Version:           
 Keywords:             |      Parent:  #1775    
-----------------------+----------------------------------------------------
 The code for parsing the output of tor-fw-helper uses fgets() on a non-
 blocking file descriptor to fetch each line of output. This appears to not
 handle incomplete lines properly. Rather than buffering data until a
 complete line is returned, fgets will return an incomplete line and set
 errno to be EAGAIN. fgets() should be replaced with something which can
 handle incomplete lines.

 Issue was originally raised by nickm in bug #1903 and there is some
 further discussion in that ticket.

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


More information about the tor-bugs mailing list