]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Note an XXX about potential overflow
authorSebastian Hahn <sebastian@torproject.org>
Thu, 30 Sep 2010 04:11:51 +0000 (06:11 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Thu, 30 Sep 2010 04:24:01 +0000 (06:24 +0200)
src/or/routerlist.c

index ee8c45d0a48418131ef9c1c37aa8308ebe98e59f..e52165ed8454eb97b2af261738e2d9acbe9baca1 100644 (file)
@@ -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;