tor/changes
Nick Mathewson dc2f10bd81 Fix a bug in calculating wakeup time on 64-bit machines.
If you had TIME_MAX > INT_MAX, and your "time_to_exhaust_bw =
accountingmax/expected_bandwidth_usage * 60" calculation managed to
overflow INT_MAX, then your time_to_consider value could underflow and
wind up being rediculously low or high.  "Low" was no problem;
negative values got caught by the (time_to_consider <= 0) check.
"High", however, would get you a wakeup time somewhere in the distant
future.

The fix is to check for time_to_exhaust_bw overflowing INT_MAX, not
TIME_MAX: We don't allow any accounting interval longer than a month,
so if time_to_exhaust_bw is significantly larger than 31*24*60*60, we
can just clip it.

This is a bugfix on 0.0.9pre6, when accounting was first introduced.
It fixes bug 2146, unless there are other causes there too.  The fix
is from boboper.  (I tweaked it slightly by removing an assignment
that boboper marked as dead, and lowering a variable that no longer
needed to be function-scoped.)
2010-12-06 12:01:32 -05:00
..
bug2097-more Add a missing ! to directory_fetches_from_authorities 2010-12-06 11:36:01 -05:00
bug2146.1 Fix a bug in calculating wakeup time on 64-bit machines. 2010-12-06 12:01:32 -05:00
bug2210 fix changes file for 2210 2010-11-30 19:19:36 -05:00
bug2235 Don't crash when accountingmax is set in non-server Tors 2010-12-03 13:37:13 -05:00
bytecount Fix a harmless off-by-one error in counting controller argument lengths 2010-12-02 13:19:21 -05:00
fix2195-fix Avoid dereferencing NULL if a bridge fails to build an ei descriptor. 2010-11-24 13:18:11 -08:00
mingw-openssl098m Fix compilation with mingw and OpenSSL 0.9.8m+ 2010-11-23 12:47:38 -05:00
remove-website stop shipping doc/img and doc/website in the tarball 2010-11-23 00:03:50 -05:00
task2196 Report only the top 10 ports in exit-port stats. 2010-11-24 08:45:05 +01:00