Skip to content
Snippets Groups Projects
Commit 37953497 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Don't compute ((uint64_t)1)<<64 in round_to_power_of_2

This would be undefined behavior if it happened. (It can't actually
happen as we're using round_to_power_of_2, since we would have to
be trying to allocate exabytes of data.)

While we're at it, fix the behavior of round_to_power_of_2(0),
and document the function better.

Fix for bug 6831.
parent 582f2187
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment