[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #1666 [Tor Client]: SOCKS handling should accept (and ignore) password auth.



#1666: SOCKS handling should accept (and ignore) password auth.
-------------------------+--------------------------------------------------
 Reporter:  nickm        |          Owner:  mwenge            
     Type:  enhancement  |         Status:  needs_review      
 Priority:  normal       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client   |        Version:                    
 Keywords:               |         Parent:                    
   Points:               |   Actualpoints:                    
-------------------------+--------------------------------------------------

Comment(by ln5):

 Do we risk running out of data in fetch_from_evbuffer_socks()?

 {{{
 evbuffer_get_length() ==> left in buffer, total
 datalen = inspect_evbuffer() ==> available bytes to read atm
 }}}

 The while loop continues as long as there's more data than what was
 available earlier.

 What if datalen == 1 or even 0?

 1. datalen = v.iov_len and then the buffer is drained with as much as
    parse_socks() says it consumed

 2. if evbuffer_get_length() returns something >1 the while condition
    is true

 3. can inspect_evbuffer() return 0 or 1?
 {{{
    - 0: if want_length == 0 -- if first parse_socks() call set
      *want_length_out=0 -- won't happen
    - 0: if evbuffer_get_length() returns 0 -- won't happen since (2)
    - v.iov_len of the last chunk
    - something >= n -- never < 2
 }}}

 Can we have v.iov_len == 0 or 1?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1666#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs