summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2013-09-05 01:27:46 -0400
committerRoger Dingledine <arma@torproject.org>2013-09-05 01:27:46 -0400
commite443beffeb8c20dddeb198cf94667a82f4cb53c7 (patch)
tree09aafe7208ca9b14c54964714ee7433029528125
parentc6f1668db3010de6aed22bd87850aa846911d43b (diff)
downloadtor-e443beffeb8c20dddeb198cf94667a82f4cb53c7.tar.gz
tor-e443beffeb8c20dddeb198cf94667a82f4cb53c7.zip
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.
-rw-r--r--src/or/onion.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index 41fe7b6eea..8e3e487ce0 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 */