diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-09-30 06:11:51 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-09-30 06:24:01 +0200 |
commit | 0702429cf778f4eba4440a1b0356924e4574e923 (patch) | |
tree | 6c255989549f7740adc8dd662baf79b5367b2289 /src | |
parent | 73def430e3ad3be0c9fe9accd4ebfc7a35e572b2 (diff) | |
download | tor-0702429cf778f4eba4440a1b0356924e4574e923.tar.gz tor-0702429cf778f4eba4440a1b0356924e4574e923.zip |
Note an XXX about potential overflow
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 2 |
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; |