aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-16 12:58:02 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-16 12:58:02 -0500
commit549493846782efa7d6655317844782b6acade1b2 (patch)
treec68875afbe9731b7dcc4fc7af540262a7ef88db8 /src
parent31c96a36994470cd63c5a71cdbd0e3acea987228 (diff)
downloadtor-549493846782efa7d6655317844782b6acade1b2.tar.gz
tor-549493846782efa7d6655317844782b6acade1b2.zip
Set or_ap/dir_ap.port on the invalid addr case. Bug in no released Tor. CID 1353178 and 1353179.
Diffstat (limited to 'src')
-rw-r--r--src/or/directory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index fc610d05c4..ecf6da8ac1 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1004,7 +1004,7 @@ directory_initiate_command(const tor_addr_t *or_addr, uint16_t or_port,
} else {
/* the family doesn't matter here, so make it IPv4 */
tor_addr_make_null(&or_ap.addr, AF_INET);
- or_port = 0;
+ or_ap.port = or_port = 0;
}
if (tor_addr_port_is_valid(dir_addr, dir_port, 0)) {
@@ -1013,7 +1013,7 @@ directory_initiate_command(const tor_addr_t *or_addr, uint16_t or_port,
} else {
/* the family doesn't matter here, so make it IPv4 */
tor_addr_make_null(&dir_ap.addr, AF_INET);
- dir_port = 0;
+ dir_ap.port = dir_port = 0;
}
directory_initiate_command_rend(&or_ap, &dir_ap,