Explorar o código

fix another integer underflow caused by buckets going negative

svn:r3346
Roger Dingledine %!s(int64=21) %!d(string=hai) anos
pai
achega
bafb3e4a5b
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/or/connection.c

+ 2 - 0
src/or/connection.c

@@ -729,6 +729,8 @@ static int connection_bucket_read_limit(connection_t *conn) {
     if (at_most > conn->receiver_bucket)
       at_most = conn->receiver_bucket;
 
+  if (at_most < 0)
+    return 0;
   return at_most;
 }