tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit d6374681281c64156bf282bdb65ddd9ac7c881e7
parent 942fa0c4a21c9e2cf3b75b0d014f386a7615d983
Author: Nick Mathewson <nickm@torproject.org>
Date:   Mon,  8 Jan 2018 10:45:40 -0500

Merge remote-tracking branch 'arma/bug24555'

Diffstat:
Msrc/or/routerlist.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/or/routerlist.c b/src/or/routerlist.c @@ -5207,14 +5207,14 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote, SMARTLIST_FOREACH_BEGIN(no_longer_old, signed_descriptor_t *, sd) { const char *msg; was_router_added_t r; + time_t tmp_cert_expiration_time; routerinfo_t *ri = routerlist_reparse_old(rl, sd); if (!ri) { log_warn(LD_BUG, "Failed to re-parse a router."); continue; } - /* need to compute this now, since add_to_routerlist may free. */ - char time_cert_expires[ISO_TIME_LEN+1]; - format_iso_time(time_cert_expires, ri->cert_expiration_time); + /* need to remember for below, since add_to_routerlist may free. */ + tmp_cert_expiration_time = ri->cert_expiration_time; r = router_add_to_routerlist(ri, &msg, 1, 0); if (WRA_WAS_OUTDATED(r)) { @@ -5224,7 +5224,9 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote, msg?msg:"???"); if (r == ROUTER_CERTS_EXPIRED) { char time_cons[ISO_TIME_LEN+1]; + char time_cert_expires[ISO_TIME_LEN+1]; format_iso_time(time_cons, consensus->valid_after); + format_iso_time(time_cert_expires, tmp_cert_expiration_time); log_warn(LD_DIR, " (I'm looking at a consensus from %s; This " "router's certificates began expiring at %s.)", time_cons, time_cert_expires);