[tor-bugs] #4229 [Tor Client]: smartlist_len returns a (signed) int

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Oct 14 18:57:09 UTC 2011


#4229: smartlist_len returns a (signed) int
------------------------+---------------------------------------------------
 Reporter:  rransom     |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by rransom):

 It's also not quite clear what we want to do for lengths in general -- do
 we sometimes use negative return values to indicate failure of a function
 that would normally return a length?  At the very least, we need safe
 (overflow-checking) unsigned-to-signed and signed-to-unsigned cast macros.

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


More information about the tor-bugs mailing list