[tor-bugs] #3306 [Tor Relay]: crypto_rand_int() should be returning an unsigned int

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sun May 29 16:55:49 UTC 2011


#3306: crypto_rand_int() should be returning an unsigned int
-----------------------+----------------------------------------------------
 Reporter:  asn        |          Owner:     
     Type:  defect     |         Status:  new
 Priority:  normal     |      Milestone:     
Component:  Tor Relay  |        Version:     
 Keywords:             |         Parent:     
   Points:             |   Actualpoints:     
-----------------------+----------------------------------------------------
 `crypto_rand_int()` is returning an int, when it should be returning an
 unsigned int.

 Currently, if `max` is larger than INT_MAX it might return a negative
 number. Fortunately, it doesn't seem to be called with anything that large
 atm.

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


More information about the tor-bugs mailing list