mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 10:12:15 +01:00
Merge branch 'bug16980'
This commit is contained in:
commit
4c6fd7106f
6
changes/bug16980
Normal file
6
changes/bug16980
Normal file
@ -0,0 +1,6 @@
|
||||
o Minor bugfixes:
|
||||
|
||||
- Fix the behavior of crypto_time_t when told to consider times
|
||||
before 1970. (These times were possible when running in a
|
||||
simulated network environment where time()'s output starts at
|
||||
zero.) Fixes bug 16980; bugfix on 0.2.7.1-alpha.
|
@ -2440,7 +2440,8 @@ crypto_rand_uint64_range(uint64_t min, uint64_t max)
|
||||
time_t
|
||||
crypto_rand_time_range(time_t min, time_t max)
|
||||
{
|
||||
return (time_t) crypto_rand_uint64_range(min, max);
|
||||
tor_assert(min < max);
|
||||
return min + (time_t)crypto_rand_uint64(max - min);
|
||||
}
|
||||
|
||||
/** Return a pseudorandom 64-bit integer, chosen uniformly from the values
|
||||
|
Loading…
Reference in New Issue
Block a user