diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-04 08:50:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-04 08:50:21 -0400 |
commit | 6beb7028d839f26d31f4743a9a924b8ed7550a54 (patch) | |
tree | eb307ebb1bceed3092aeebb46636a0111b2cc952 /src/or/consdiffmgr.c | |
parent | e1d31f2a2f5c7810c9c34ffa57e4b86ec8fd860b (diff) | |
download | tor-6beb7028d839f26d31f4743a9a924b8ed7550a54.tar.gz tor-6beb7028d839f26d31f4743a9a924b8ed7550a54.zip |
Do not BUG on missing sha3-as-signed field
This can happen if you've been running an earlier alpha on your
relay. Instead, just ignore the entry.
Diffstat (limited to 'src/or/consdiffmgr.c')
-rw-r--r-- | src/or/consdiffmgr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c index 96b0bba900..d478101c6b 100644 --- a/src/or/consdiffmgr.c +++ b/src/or/consdiffmgr.c @@ -858,9 +858,12 @@ consdiffmgr_rescan_flavor_(consensus_flavor_t flavor) continue; // LCOV_EXCL_LINE uint8_t this_sha3[DIGEST256_LEN]; - if (BUG(cdm_entry_get_sha3_value(this_sha3, c, - LABEL_SHA3_DIGEST_AS_SIGNED)<0)) - continue; // LCOV_EXCL_LINE + if (cdm_entry_get_sha3_value(this_sha3, c, + LABEL_SHA3_DIGEST_AS_SIGNED)<0) { + // Not actually a bug, since we might be running with a directory + // with stale files from before the #22143 fixes. + continue; + } if (cdm_diff_ht_check_and_note_pending(flavor, this_sha3, most_recent_sha3)) { // This is already pending, or we encountered an error. |