[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.2.4] don't let recently_chosen_ntors overflow
commit e443beffeb8c20dddeb198cf94667a82f4cb53c7
Author: Roger Dingledine <arma@xxxxxxxxxxxxxx>
Date: Thu Sep 5 01:27:46 2013 -0400
don't let recently_chosen_ntors overflow
with commit c6f1668d we let it grow arbitrarily large.
it can still overflow, but the damage is very small now.
---
src/or/onion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/or/onion.c b/src/or/onion.c
index 41fe7b6..8e3e487 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -212,7 +212,7 @@ static uint16_t
decide_next_handshake_type(void)
{
/* The number of times we've chosen ntor lately when both were available. */
- static int recently_chosen_ntors = 0;
+ static unsigned int recently_chosen_ntors = 0;
if (!ol_entries[ONION_HANDSHAKE_TYPE_NTOR])
return ONION_HANDSHAKE_TYPE_TAP; /* no ntors? try tap */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits