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

[tor-bugs] #6831 [Tor Relay]: Fix behavior of round_to_power_of_2



#6831: Fix behavior of round_to_power_of_2
-----------------------+----------------------------------------------------
 Reporter:  nickm      |          Owner:                    
     Type:  defect     |         Status:  new               
 Priority:  trivial    |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor Relay  |        Version:                    
 Keywords:             |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------
 When called on a value greater than 1llu <<63, round_to_power_of_2 will
 try to compute 1llu <<64, which is undefined.

 This shouldn't be happening, since we only call this function in one place
 related to memory allocation, and we shouldn't be trying to allocate
 exabits of data anyway.

 Still, better to fix it than not.

 Similar to #6827 ; found while looking for similar problematic shifts.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6831>
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