[tor-bugs] #7729 [Tor]: Reading pending TLS bytes can take us	over at_most
    Tor Bug Tracker & Wiki 
    blackhole at torproject.org
       
    Sat Feb  9 02:58:14 UTC 2013
    
    
  
#7729: Reading pending TLS bytes can take us over at_most
-----------------------+----------------------------------------------------
    Reporter:  nickm   |       Owner:                    
        Type:  defect  |      Status:  needs_review      
    Priority:  normal  |   Milestone:  Tor: 0.2.4.x-final
   Component:  Tor     |     Version:                    
  Resolution:          |    Keywords:  tor-relay         
      Parent:          |      Points:                    
Actualpoints:          |  
-----------------------+----------------------------------------------------
Comment(by cypherpunks):
 Such init of max_to_read:
 {{{
 +  if (at_most < 0) { /* we need to initialize it */
      /* how many bytes are we allowed to read? */
      at_most = connection_bucket_read_limit(conn, approx_time());
 +    *max_to_read = at_most;
    }
 }}}
 Leads to extra call of connection_read_to_buf() if recv will return
 EWOULDBLOCK.
 It probably better to refactor connection_handle_read_impl() with no loop.
-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7729#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
    
    
More information about the tor-bugs
mailing list