[tor-bugs] #8206 [Tor]: Check return values from fcntl and setsockopt

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Feb 17 11:29:17 UTC 2013


#8206: Check return values from fcntl and setsockopt
----------------------------+-----------------------------------------------
 Reporter:  nickm           |          Owner:                    
     Type:  defect          |         Status:  needs_review      
 Priority:  minor           |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor             |        Version:                    
 Keywords:  tor-relay easy  |         Parent:                    
   Points:                  |   Actualpoints:                    
----------------------------+-----------------------------------------------
Changes (by flupzor):

 * cc: alex@… (added)
  * status:  new => needs_review


Comment:

 This diff adds checks for return codes of fcntl and setsockopt then logs
 and exits the connection/function if an error occurs.

 Also, the function set_non_blocking function was used wrong. Instead of
 simply overwriting the file status flags it now retrieves the current file
 status flags and adds the flag O_NONBLOCKING and then sets the new flags.

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


More information about the tor-bugs mailing list