[tor-bugs] #6831 [Tor Relay]: Fix behavior of round_to_power_of_2
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Thu Sep 13 14:32:38 UTC 2012
#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
More information about the tor-bugs
mailing list