aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-09-30 06:11:51 +0200
committerSebastian Hahn <sebastian@torproject.org>2010-09-30 06:24:01 +0200
commit0702429cf778f4eba4440a1b0356924e4574e923 (patch)
tree6c255989549f7740adc8dd662baf79b5367b2289
parent73def430e3ad3be0c9fe9accd4ebfc7a35e572b2 (diff)
downloadtor-0702429cf778f4eba4440a1b0356924e4574e923.tar.gz
tor-0702429cf778f4eba4440a1b0356924e4574e923.zip
Note an XXX about potential overflow
-rw-r--r--src/or/routerlist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index ee8c45d0a4..e52165ed84 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1928,6 +1928,8 @@ smartlist_choose_by_bandwidth(smartlist_t *sl, bandwidth_weight_rule_t rule,
bitarray_set(guard_bits, i);
if (is_known) {
bandwidths[i] = (int32_t) this_bw; // safe since MAX_BELIEVABLE<INT32_MAX
+ // XXX this is no longer true! We don't always cap the bw anymore. Can
+ // a consensus make us overflow?-sh
tor_assert(bandwidths[i] >= 0);
if (is_guard)
total_guard_bw += this_bw;