diff options
author | David Goulet <dgoulet@torproject.org> | 2020-07-08 07:50:50 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-08 07:50:50 -0400 |
commit | 46e34842619be7467e3cd062a2c7fbcd112b9cff (patch) | |
tree | d2122febb7543ce6850883594dbc10015ab347c3 /src/app/config/resolve_addr.c | |
parent | 9b2cadb492ee07ebb086b934b01ff8a5159fcc77 (diff) | |
download | tor-46e34842619be7467e3cd062a2c7fbcd112b9cff.tar.gz tor-46e34842619be7467e3cd062a2c7fbcd112b9cff.zip |
addr: Initialize resolved address cache to NULL address
Related to #40022
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/app/config/resolve_addr.c')
-rw-r--r-- | src/app/config/resolve_addr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/app/config/resolve_addr.c b/src/app/config/resolve_addr.c index 75b5eb75b1..9e7c23c881 100644 --- a/src/app/config/resolve_addr.c +++ b/src/app/config/resolve_addr.c @@ -42,13 +42,15 @@ typedef enum { } fn_address_ret_t; /** Last resolved addresses. */ -static tor_addr_t last_resolved_addrs[IDX_SIZE]; +static tor_addr_t last_resolved_addrs[IDX_SIZE] = + { TOR_ADDR_NULL, TOR_ADDR_NULL, TOR_ADDR_NULL }; /** Last suggested addresses. * * These addresses come from a NETINFO cell from a trusted relay (currently * only authorities). We only use those in last resort. */ -static tor_addr_t last_suggested_addrs[IDX_SIZE]; +static tor_addr_t last_suggested_addrs[IDX_SIZE] = + { TOR_ADDR_NULL, TOR_ADDR_NULL, TOR_ADDR_NULL }; static inline int af_to_idx(const int family) |