瀏覽代碼

fix another integer underflow caused by buckets going negative

svn:r3346
Roger Dingledine 21 年之前
父節點
當前提交
bafb3e4a5b
共有 1 個文件被更改,包括 2 次插入0 次删除
  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;
 }