[tor-bugs] #4230 [Tor Client]: smartlist functions contain bogus overflow checks

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Oct 20 18:15:03 UTC 2011


#4230: smartlist functions contain bogus overflow checks
------------------------+---------------------------------------------------
 Reporter:  rransom     |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  major       |      Milestone:  Tor: 0.2.1.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by mansour):

 Replying to [comment:6 nickm]:
 > Fortunately, I think the only overflow check to worry about is
 smartlist_ensure_capacity; everything else calls that when it wants to
 grow the smartlist.

 I've attached a quick fix for this function. Tests fine but it needs
 review.

 The idea is to just use INT_MAX in case of potential overflow.

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


More information about the tor-bugs mailing list