From d696bd1bfc3b61943ae4a2be8e4a9fcdfeaec246 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 7 Jun 2011 14:46:28 -0400 Subject: Fix crash bug (3361) when setting off-flavor networkstatus When we set a networkstatus in the non-preferred flavor, we'd check the time in the current_consensus. But that might have been NULL, which could produce a crash as seen in bug 3361. --- src/or/networkstatus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 837c8c2bf2..ab1358bca9 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -1814,7 +1814,7 @@ networkstatus_set_current_consensus(const char *consensus, * valid-after time, declare that our clock is skewed. */ #define EARLY_CONSENSUS_NOTICE_SKEW 60 - if (now < current_consensus->valid_after - EARLY_CONSENSUS_NOTICE_SKEW) { + if (now < c->valid_after - EARLY_CONSENSUS_NOTICE_SKEW) { char tbuf[ISO_TIME_LEN+1]; char dbuf[64]; long delta = now - c->valid_after; -- cgit v1.2.3-54-g00ecf