[or-cvs] fix another integer underflow caused by buckets going negat...

Roger Dingledine arma at seul.org
Wed Jan 12 12:19:03 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	connection.c 
Log Message:
fix another integer underflow caused by buckets going negative


Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -d -r1.315 -r1.316
--- connection.c	12 Jan 2005 10:00:38 -0000	1.315
+++ connection.c	12 Jan 2005 12:19:00 -0000	1.316
@@ -729,6 +729,8 @@
     if (at_most > conn->receiver_bucket)
       at_most = conn->receiver_bucket;
 
+  if (at_most < 0)
+    return 0;
   return at_most;
 }
 



More information about the tor-commits mailing list