|
@@ -1143,6 +1143,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
|
|
dircollator_t *collator = NULL;
|
|
|
tor_assert(flavor == FLAV_NS || flavor == FLAV_MICRODESC);
|
|
|
tor_assert(total_authorities >= smartlist_len(votes));
|
|
|
+ tor_assert(total_authorities > 0);
|
|
|
|
|
|
flavor_name = networkstatus_get_flavor_name(flavor);
|
|
|
|
|
@@ -1535,7 +1536,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
|
|
|
|
|
for (int voter_idx = 0; voter_idx < smartlist_len(votes); ++voter_idx) {
|
|
|
if (vrs_lst[voter_idx] == NULL)
|
|
|
- continue;
|
|
|
+ continue;
|
|
|
rs = vrs_lst[voter_idx];
|
|
|
++n_listing;
|
|
|
|
|
@@ -1579,6 +1580,10 @@ networkstatus_compute_consensus(smartlist_t *votes,
|
|
|
if (n_listing <= total_authorities/2)
|
|
|
continue;
|
|
|
|
|
|
+
|
|
|
+ * if n_listing is at least 1 */
|
|
|
+ tor_assert(current_rsa_id);
|
|
|
+
|
|
|
|
|
|
* routerinfo and its contents are. */
|
|
|
memset(microdesc_digest, 0, sizeof(microdesc_digest));
|