]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix another integer underflow caused by buckets going negative
authorRoger Dingledine <arma@torproject.org>
Wed, 12 Jan 2005 12:19:00 +0000 (12:19 +0000)
committerRoger Dingledine <arma@torproject.org>
Wed, 12 Jan 2005 12:19:00 +0000 (12:19 +0000)
svn:r3346

src/or/connection.c

index 8df204ff7f2c6f1091f785f4995e021ece588bca..459542e32ce2bd5a8e0aa53a8f3716260075fc83 100644 (file)
@@ -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;
 }