fix another integer underflow caused by buckets going negative

svn:r3346
This commit is contained in:
Roger Dingledine 2005-01-12 12:19:00 +00:00
parent 24a97d2c55
commit bafb3e4a5b

View 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;
}