Bulletproof the safe_timer_diff function
commit601b41084af1f941c4266237e2c6df46be8981dd
authorNick Mathewson <nickm@torproject.org>
Fri, 29 Jan 2016 03:04:24 +0000 (28 22:04 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 10 Feb 2016 20:49:11 +0000 (10 15:49 -0500)
treed129ab85e26dc32babae37e8a03c42bc37d4a5c1
parenta5bed4dab2f8521f744d5137e4f439b073c7e5e9
Bulletproof the safe_timer_diff function

Originally it can overflow in some weird cases.  Now it should no longer
be able to do so.

Additionally, limit main's timers to 30 days rather than to 38 years;
we don't actually want any 38-year timers.

Closes bug 17682.
src/or/main.c