summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-10-23 15:55:08 -0400
committerNick Mathewson <nickm@torproject.org>2017-10-23 15:55:08 -0400
commit9ae4ffc0763fcb0a50d0d02be7d3362cc496adc1 (patch)
tree12f20b1ea3070664666c19cbe77d9417a30f2e19 /src
parenteac4c374e456af4f216392ec2d3b037d5f57e2f3 (diff)
parentb1bd1bf19f7e17a94cefaccb63e5608fda1df4e2 (diff)
downloadtor-9ae4ffc0763fcb0a50d0d02be7d3362cc496adc1.tar.gz
tor-9ae4ffc0763fcb0a50d0d02be7d3362cc496adc1.zip
Merge branch 'maint-0.2.9' into maint-0.3.0
Diffstat (limited to 'src')
-rw-r--r--src/or/nodelist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 2ca52e74b5..938b791102 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1127,6 +1127,11 @@ node_get_prim_orport(const node_t *node, tor_addr_port_t *ap_out)
node_assert_ok(node);
tor_assert(ap_out);
+ /* Clear the address, as a safety precaution if calling functions ignore the
+ * return value */
+ tor_addr_make_null(&ap_out->addr, AF_INET);
+ ap_out->port = 0;
+
/* Check ri first, because rewrite_node_address_for_bridge() updates
* node->ri with the configured bridge address. */