summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-06-07 14:46:28 -0400
committerNick Mathewson <nickm@torproject.org>2011-06-07 14:46:28 -0400
commitd696bd1bfc3b61943ae4a2be8e4a9fcdfeaec246 (patch)
tree8110dd23bdb1885aabd7661cd31e38a24c17bd70 /src
parentd25d08dc4dceef484206c932648023b36cf3ec7c (diff)
downloadtor-d696bd1bfc3b61943ae4a2be8e4a9fcdfeaec246.tar.gz
tor-d696bd1bfc3b61943ae4a2be8e4a9fcdfeaec246.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/or/networkstatus.c2
1 files changed, 1 insertions, 1 deletions
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;