mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Note an XXX about potential overflow
This commit is contained in:
parent
73def430e3
commit
0702429cf7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user