tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit b83c6ab737e403fd555c6fe0e0af6abaa5a48044
parent e66eba664ae85b786097cdd22c1a601ad45d95b5
Author: David Goulet <dgoulet@torproject.org>
Date:   Thu, 16 Jul 2020 14:15:25 -0400

Merge branch 'tor-gitlab/mr/56'

Diffstat:
Msrc/feature/nodelist/nodelist.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c @@ -1988,6 +1988,12 @@ node_set_country(node_t *node) else if (node->ri) ipv4_addr = &node->ri->ipv4_addr; + /* IPv4 is mandatory for a relay so this should not happen unless we are + * attempting to set the country code on a node without a descriptor. */ + if (BUG(!ipv4_addr)) { + node->country = -1; + return; + } node->country = geoip_get_country_by_addr(ipv4_addr); }