aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-16 08:48:28 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-16 08:48:28 -0500
commitbb23ad3e47d2953079fb1d8d7c02db939a30633b (patch)
treea5fd54578b21253a6202825a6294461e6e538229 /src/common
parent10e442ba93be0c41daec10319943aa19c616b281 (diff)
parente2e09a2dbeae508ef8539e48eff1babb6aa0346e (diff)
downloadtor-bb23ad3e47d2953079fb1d8d7c02db939a30633b.tar.gz
tor-bb23ad3e47d2953079fb1d8d7c02db939a30633b.zip
Merge remote-tracking branch 'teor/feature17863'
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/address.c b/src/common/address.c
index 627764153b..69a80986ed 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1039,6 +1039,8 @@ tor_addr_compare_masked(const tor_addr_t *addr1, const tor_addr_t *addr2,
return r;
}
case AF_INET6: {
+ if (mbits > 128)
+ mbits = 128;
const uint8_t *a1 = tor_addr_to_in6_addr8(addr1);
const uint8_t *a2 = tor_addr_to_in6_addr8(addr2);
const int bytes = mbits >> 3;