Commit d696bd1b authored by Nick Mathewson's avatar Nick Mathewson 🎨
Browse files

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.
parent d25d08dc
o Major bugfixes:
- Fix a crash bug that could occur when setting a consensus in a
non-used flavor without having a current consensus set. Fixes bug
3361; bugfix on
......@@ -1814,7 +1814,7 @@ networkstatus_set_current_consensus(const char *consensus,
* valid-after time, declare that our clock is skewed. */
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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment