mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
Limit IPv6 mask bits to 128
This commit is contained in:
parent
6ba8afe5f8
commit
e54e71fb6b
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue