aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-07 12:38:28 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-07 12:40:05 -0400
commitc8a0cceae279eb2b27c51a358e00942a9967ca77 (patch)
tree49d9308a7968be6ae2878a03736f94473f21086c /src/or/dirvote.c
parent66dbbc29600992375c8fb2d18a90831e305106b0 (diff)
downloadtor-c8a0cceae279eb2b27c51a358e00942a9967ca77.tar
tor-c8a0cceae279eb2b27c51a358e00942a9967ca77.tar.gz
Check more thoroughly for dups when parsing networkstatus parameters
See changes file for details. Partial fix for bug 5786; fix on 0.2.2.2-alpha.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index cddb65824..4848917b2 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -668,10 +668,10 @@ dirvote_compute_params(smartlist_t *votes, int method, int total_authorities)
const char *next_param;
int ok=0;
eq = strchr(param, '=');
- tor_assert(i<n_votes);
+ tor_assert(i<n_votes); /* Make sure we prevented vote-stuffing. */
vals[i++] = (int32_t)
tor_parse_long(eq+1, 10, INT32_MIN, INT32_MAX, &ok, NULL);
- tor_assert(ok);
+ tor_assert(ok); /* Already checked these when parsing. */
if (param_sl_idx+1 == smartlist_len(param_list))
next_param = NULL;